This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Testing Leak Sanitizer?
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Cc: Yury Gribov <y dot gribov at samsung dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 27 Nov 2014 22:48:21 +0100
- Subject: Re: Testing Leak Sanitizer?
- Authentication-results: sourceware.org; auth=none
- References: <CAKdteOYC2vnNZb8ivbFCeX4AGeVdxd5Z9FaMv+DeGSLo_H3RCw at mail dot gmail dot com> <542ADEB5 dot 8050603 at samsung dot com> <CAGQ9bdzEjPifOWZhsBLhS_YKj6T8xUDXvih9dGjcvo4V+dfvzQ at mail dot gmail dot com>
On 30 September 2014 at 19:08, Konstantin Serebryany
<konstantin.s.serebryany@gmail.com> wrote:
> Correct, you can run tests from llvm tree with any compiler.
> https://code.google.com/p/address-sanitizer/wiki/AddressSanitizerTestSuite
>
I've read that document, and as a first step I wanted to build LLVM +
run the tests in the "best case" (before any modifications I could
make, and to have a reference to compare with GCC).
I have a few questions.
To have clang as the "toolchain I want to test", I added the clang
sources under llvm_tmp_src/tools, and compiler-rt sources under
projects.
I managed to run the tests, but I couldn't find the detailed logs.
I added -DLLVM_LIT_ARGS=-v when calling cmake, which gave me a list like:
XFAIL: AddressSanitizer64 :: TestCases/use-after-scope.cc (245 of 249)
PASS: AddressSanitizer64 :: TestCases/use-after-poison.cc (246 of 249)
1- I suppose there are more details, like gcc.log. Where are they?
2- this is running x86_64 native tests, how can I cross-test with
aarch64 (using qemu for instance)?
Thanks
> Note that lsan does not depend on the compiler, it is a library-only feature.
>
> --kcc
>
> On Tue, Sep 30, 2014 at 9:47 AM, Yury Gribov <y.gribov@samsung.com> wrote:
>> On 09/30/2014 07:15 PM, Christophe Lyon wrote:
>>>
>>> Hello,
>>>
>>> After I've recently enabled Address Sanitizer for AArch64 in GCC, I'd
>>> like to enable Leak Sanitizer.
>>>
>>> I'd like to know what are the requirements wrt testing it? IIUC there
>>> are no lsan tests in the GCC testsuite so far.
>>>
>>> Should I just test a few sample programs to check if basic functionality
>>> is OK?
>>>
>>> The patch seems to be a 1-line patch, I just want to check the
>>> acceptance criteria.
>>
>>
>> AFAIK compiler-rt testsuite supports running under non-Clang compiler. Don't
>> ask me how to setup the beast though.
>>