The read/write flag is set by manually decoding the instruction that caused the exception. It is implemented this way because the the cause register which contains the needed flag was removed from the signal context structure which the user handler receives from the kernel.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/sanitizer_common/sanitizer_linux.cc | ||
---|---|---|
1741–1742 ↗ | (On Diff #142922) | Use uint32_t here. |
1753 ↗ | (On Diff #142922) | You need to add s(w|d)(l|r) under an #ifdef __mips_isa_rev < 6 clause. |
1763 ↗ | (On Diff #142922) | You need to add l(w|d)(l|r) under an #ifdef __mips_isa_rev < 6 clause. |
1763 ↗ | (On Diff #142922) | You may also want to add lwpc and lwupc to this list as well, but they are only for MIPSR6. |
test/sanitizer_common/TestCases/Posix/illegal_read_test.cc | ||
11 ↗ | (On Diff #142922) | Add: return 0; here. |
test/sanitizer_common/TestCases/Posix/illegal_write_test.cc | ||
10 ↗ | (On Diff #142922) | Add: return 0; here. |
Comment Actions
LGTM. Keep on eye on the buildbots when you commit this in case there are sanitizer implementations can't distinguish between illegal reads and writes.