Skip to content

Commit 0c23bde

Browse files
lhamesllvmbot
authored andcommitted
[ORC] Fix buggy calculation of second-level-page offset in unwind-info.
SecondLevelPageOffset should be incremented by SecondLevelPageSize bytes, not one byte. Failure to calculate the offset correctly leads to corrupted unwind-info (and consequently broken exceptions / unwinding) when more than one second level page is needed. Since JITLink's unwind support only produces UNWIND_SECOND_LEVEL_REGULAR-style pages this would trigger for any file containing more than 511 functions with unwind info. The included test-case contains 1022 functions (sufficient for both the current format and any future implementation that supports UNWIND_SECOND_LEVEL_COMPRESSED pages). Thanks to @edoardo on discord for spotting this bug! (cherry picked from commit 88f55d1)
1 parent 7782b83 commit 0c23bde

File tree

2 files changed

+1042
-2
lines changed

2 files changed

+1042
-2
lines changed

0 commit comments

Comments
 (0)