[PATCH] D45768: [mips] Implement GetWriteFlag() for mips
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 02:30:03 PDT 2018
sdardis added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1741-1742
+ long *exception_source;
+ int32_t faulty_instruction;
+ int16_t op_code;
+
----------------
Use uint32_t here.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1753
+ case 0x2b: // sw
+ case 0x3f: // sd
+ return SignalContext::WRITE;
----------------
You need to add s(w|d)(l|r) under an #ifdef __mips_isa_rev < 6 clause.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1763
+ case 0x37: // ld
+ return SignalContext::READ;
+ }
----------------
You need to add l(w|d)(l|r) under an #ifdef __mips_isa_rev < 6 clause.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1763
+ case 0x37: // ld
+ return SignalContext::READ;
+ }
----------------
sdardis wrote:
> You need to add l(w|d)(l|r) under an #ifdef __mips_isa_rev < 6 clause.
You may also want to add lwpc and lwupc to this list as well, but they are only for MIPSR6.
================
Comment at: test/sanitizer_common/TestCases/Posix/illegal_read_test.cc:11
+ a = *null;
+}
+
----------------
Add:
```
return 0;
```
here.
================
Comment at: test/sanitizer_common/TestCases/Posix/illegal_write_test.cc:10
+ *null = 0;
+}
+
----------------
Add:
```
return 0;
```
here.
https://reviews.llvm.org/D45768
More information about the llvm-commits
mailing list