Details
- Reviewers
hctim eugenis - Commits
- rG8f9db0aeebec: [hwasan] Show sp in register dump.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/hwasan/hwasan_report.cpp | ||
---|---|---|
657 | I'd rather put it in the last line of the dump, after x30. | |
compiler-rt/test/hwasan/TestCases/stack-pointer-report.c | ||
13 ↗ | (On Diff #353989) | I'd rather copy sp into a local variable and print it right here. It is not impossible that x11 would be in use at this point. SP does not normally change within a function (unless you do alloca or other weird things), so the copy does not have to be immediately before the fault. |
14 ↗ | (On Diff #353989) | this volatile does not do anything AFAIK - you'd need "z" itself to be volatile to force the memory access. This does not really matter at -O0 but still. |
compiler-rt/test/hwasan/TestCases/stack-pointer-report.c | ||
---|---|---|
13 ↗ | (On Diff #353989) | In fact, update register-dump-read.c test instead of adding a new one. |
compiler-rt/test/hwasan/TestCases/stack-pointer-report.c | ||
---|---|---|
13 ↗ | (On Diff #353989) | -ffixed-x11 is another option but I like Evgenii's suggestion better. |
Thanks!
compiler-rt/test/hwasan/TestCases/stack-pointer-report.c | ||
---|---|---|
13 ↗ | (On Diff #353989) | I added it to register-dump-read.c, but used a register (and fixed-x11), because that is how the whole test is structured and it seemed simpler this way. |
I'd rather put it in the last line of the dump, after x30.