[PATCH] D46650: [lsan] Try to fix test failure due to compiler optimization

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 10:51:53 PDT 2018


vitalybuka added inline comments.


================
Comment at: test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc:28
 void Leak() {
   sink = new char[100];  // trigger lsan report.
 }
----------------
This stack cleanup looks unreliable.
Maybe just leak twice?

```
__attribute__((noinline))
void Leak() {
  sink = new char[100];
  sink = new char[100];
}
```


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D46650





More information about the llvm-commits mailing list