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

Sergey Matveev earthdok at google.com
Tue Nov 11 06:56:54 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'
----------------
foad wrote:
> 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'
> ```
You're right. This code needs to be deduplicated. Alexey wrote those configs so he's in a better position to help.

http://reviews.llvm.org/D6189






More information about the llvm-commits mailing list