[PATCH] [ASan] Fix leak test on 64-bit targets other than x86-64

Jay Foad jay.foad at gmail.com
Tue Nov 11 06:04:19 PST 2014


================
Comment at: test/asan/lit.cfg:126
@@ -125,3 +125,3 @@
 # Turn on leak detection on 64-bit Linux.
 if config.host_os == 'Linux' and config.bits == '64':
   config.environment['ASAN_OPTIONS'] = 'detect_leaks=1'
----------------
earthdok wrote:
> Where does this mention x86_64? Looks like all this patch does is restrict the test to 64-bit Linux, which is already the case.
Good point. I assumed that the existing test for enabling detect_leaks=1 was correct, but it wasn't:
```
# Turn on leak detection on 64-bit Linux.
if config.host_os == 'Linux' and config.bits == '64':
  config.environment['ASAN_OPTIONS'] = 'detect_leaks=1'
```
test/asan/Unit/lit.site.cfg.in has a better test:
```
# Enable leak detection in ASan unit tests on x86_64-linux.
if config.host_os == 'Linux' and config.host_arch == 'x86_64':
  config.environment['ASAN_OPTIONS'] = 'detect_leaks=1'
```

http://reviews.llvm.org/D6189






More information about the llvm-commits mailing list