[compiler-rt] [llvm] [RISCV][sanitizer] Fix sanitizer support for different virtual memory layout (PR #66743)

Hau Hsu via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 01:43:55 PDT 2024


hau-hsu wrote:

Hi @luismarques 
Sorry I was working on other projects. Now I am back for the asan PR.
I rebased the commits upon tag `llvmorg-18.1.3` (c13b7485b87909fcf739f62cfa382b55407433c0) and rerun the tests on QEMU (system mode).
The failed cases with and without the PR now becomes 9 and 11.

Do we need to do more investigation for this PR?

Thanks

Detailed test results:

With this PR:
```
Failed Tests (9):
  AddressSanitizer-riscv64-linux :: TestCases/Linux/stack-trace-dlclose.cpp
  AddressSanitizer-riscv64-linux :: TestCases/Posix/strndup_oob_test.cpp
  AddressSanitizer-riscv64-linux :: TestCases/calloc-overflow.cpp
  AddressSanitizer-riscv64-linux :: TestCases/debug_stacks.cpp
  AddressSanitizer-riscv64-linux :: TestCases/log-path_test.cpp
  AddressSanitizer-riscv64-linux :: TestCases/malloc-size-too-big.cpp
  AddressSanitizer-riscv64-linux :: TestCases/strncpy-overflow.cpp
  AddressSanitizer-riscv64-linux :: TestCases/use-after-free-right.cpp
  AddressSanitizer-riscv64-linux :: TestCases/use-after-free.cpp


Testing Time: 1274.49s

Total Discovered Tests: 721
  Unsupported      : 199 (27.60%)
  Passed           : 512 (71.01%)
  Expectedly Failed:   1 (0.14%)
  Failed           :   9 (1.25%)
```

Without this PR:

```
Failed Tests (11):
  AddressSanitizer-riscv64-linux :: TestCases/Linux/stack-trace-dlclose.cpp
  AddressSanitizer-riscv64-linux :: TestCases/Posix/strndup_oob_test.cpp
  AddressSanitizer-riscv64-linux :: TestCases/Posix/strndup_oob_test2.cpp   (new)
  AddressSanitizer-riscv64-linux :: TestCases/calloc-overflow.cpp
  AddressSanitizer-riscv64-linux :: TestCases/debug_stacks.cpp
  AddressSanitizer-riscv64-linux :: TestCases/log-path_test.cpp
  AddressSanitizer-riscv64-linux :: TestCases/malloc-size-too-big.cpp
  AddressSanitizer-riscv64-linux :: TestCases/sanity_check_pure_c.c (new)
  AddressSanitizer-riscv64-linux :: TestCases/strncpy-overflow.cpp
  AddressSanitizer-riscv64-linux :: TestCases/use-after-free-right.cpp
  AddressSanitizer-riscv64-linux :: TestCases/use-after-free.cpp


Testing Time: 1644.78s

Total Discovered Tests: 721
  Unsupported      : 199 (27.60%)
  Passed           : 510 (70.74%)
  Expectedly Failed:   1 (0.14%)
  Failed           :  11 (1.53%)
```

https://github.com/llvm/llvm-project/pull/66743


More information about the llvm-commits mailing list