Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@imhameed
Copy link
Contributor

Fixes #19009.

#18505 made PLT initialization occur at
image load time. When initializing the PLT for mscorlib,
mono_defaults.corlib is not yet initialized.

This change works around this by using mscorlib_aot_module--which is
initialized relatively early--instead of mono_defaults.corlib. PLT
initialization is also moved slightly later: it now happens after
use_page_trampolines has been initialized. The USE_PAGE_TRAMPOLINES
macro has also been changed to dereference mscorlib_aot_module.

This commit also removes an unused parameter from
mono_aot_create_specific_trampoline.

Fixes mono#19009.

mono#18505 made PLT initialization occur at
image load time. When initializing the PLT for mscorlib,
`mono_defaults.corlib` is not yet initialized.

This change works around this by using `mscorlib_aot_module`--which is
initialized relatively early--instead of `mono_defaults.corlib`. PLT
initialization is also moved slightly later: it now happens after
`use_page_trampolines` has been initialized. The `USE_PAGE_TRAMPOLINES`
macro has also been changed to dereference `mscorlib_aot_module`.

This commit also removes an unused parameter from
`mono_aot_create_specific_trampoline`.
@jaykrell
Copy link
Contributor

What was the stack?
Did making the one function extern fix it?

@imhameed
Copy link
Contributor Author

@jaykrell: https://gist.githubusercontent.com/imhameed/97ed5c83621390c08f583d4bba6d79f2/raw/802c5fd03a8e56099895e776377a7a15df57b979/asdasfdsfds.md

I haven't needed to change the linkage of any functions to get usable debugging information locally. I have no idea why nonsense symbols like mono_aot_get_method_flags appeared in the stack from CI.

@lewurm
Copy link
Contributor

lewurm commented Feb 27, 2020

@monojenkins backport 2020-02

@jaykrell
Copy link
Contributor

What if you strip the binaries?

@lewurm lewurm merged commit 5e5b1ed into mono:master Feb 27, 2020
monojenkins added a commit that referenced this pull request Feb 27, 2020
[2020-02] [aot] Avoid `mono_defaults` when creating trampolines.

Fixes #19009.

#18505 made PLT initialization occur at
image load time. When initializing the PLT for mscorlib,
`mono_defaults.corlib` is not yet initialized.

This change works around this by using `mscorlib_aot_module`--which is
initialized relatively early--instead of `mono_defaults.corlib`. PLT
initialization is also moved slightly later: it now happens after
`use_page_trampolines` has been initialized. The `USE_PAGE_TRAMPOLINES`
macro has also been changed to dereference `mscorlib_aot_module`.

This commit also removes an unused parameter from
`mono_aot_create_specific_trampoline`.

Backport of #19055.

/cc @lewurm @imhameed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash in mono_create_specific_trampoline on iOS 64-bit/32-bit + tvOS

4 participants