Skip to content

Conversation

@filipnavara
Copy link
Member

@filipnavara filipnavara commented Sep 1, 2021

Fixes #56100

Here's a little bit of background on the problem. When multiple AOT modules got linked into the same executable for iOS/MacCatalyst the LLVM and JIT code sections of different modules got interleaved. The resulting AOT module info looks something like this:

JIT start: 0x101002100 JIT end: 0x1010035e0
LLVM start: 0x104c027c8 LLVM end: 0x104c603e8
Sorted methods:
  0x101002250
  0x101002390
  0x101002470
  0x104c027c8
  0x104c027e0
  ...

The previous code incorrectly assumed that the third method had a code size 0x104c027c8 - 0x101002470. When inserted into lookup table any of the AOT code inside the range 0x1010035e0 (JIT code end) - 0x104c027c8 (LLVM code start) would incorrectly end up being mapped to the last JIT method.

(Note: The JIT name here is misleading.)

@ghost ghost added area-Codegen-LLVM-mono community-contribution Indicates that the PR has been added by a community member labels Sep 1, 2021
@lambdageek
Copy link
Member

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Sep 1, 2021

@imhameed
Copy link
Contributor

imhameed commented Sep 1, 2021

The "Build MacCatalyst x64 Release AllSubsets_Mono" failures are also present in a completely unrelated PR. Ditto for "Build iOSSimulator x64 Release AllSubsets_Mono".

@lambdageek lambdageek merged commit f8f4aeb into dotnet:main Sep 1, 2021
@SamMonoRT SamMonoRT requested a review from rolfbjarne September 1, 2021 17:18
@ghost ghost locked as resolved and limited conversation to collaborators Oct 1, 2021
@filipnavara filipnavara deleted the llvm_aot_exception_crash branch June 5, 2025 07:41
@filipnavara filipnavara restored the llvm_aot_exception_crash branch June 5, 2025 07:41
@filipnavara filipnavara deleted the llvm_aot_exception_crash branch June 5, 2025 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Codegen-LLVM-mono community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS: building with LLVM causes some exception catch clauses to not work

3 participants