Skip to content

Commit 88f55d1

Browse files
committed
[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!
1 parent aefa30e commit 88f55d1

File tree

2 files changed

+1042
-2
lines changed

2 files changed

+1042
-2
lines changed

0 commit comments

Comments
 (0)