On s390, siginfo reports the faulting address with page granularity -
we need to mask off the low bits of sp before comparison.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
LGTM w/ a nit
lib/asan/asan_posix.cc | ||
---|---|---|
49 | Do you mean that sig.addr is rounded down to the nearest page boundary? |
lib/asan/asan_posix.cc | ||
---|---|---|
49 | sig.addr is rounded down to nearest page bounduary (because s390 gives you only the page index on a fault, not the full address). However, there is no redzone - accesses below sp are verboten. I'll try to think of a better wording for the comment before commiting. |
Do you mean that sig.addr is rounded down to the nearest page boundary?
Do you need some extra space below sp (same as +512 in the common case below)? I.e. is it possible that the true fault address is below sp and falls into a different page, and then sig.addr would be ((sig.sp & 0xFFF) - 0x1000) ?