[cfe-dev] Sanitizer test failures when switching to libc++ by default

Alexey Samsonov via cfe-dev cfe-dev at lists.llvm.org
Fri Feb 5 14:04:42 PST 2016


On Fri, Feb 5, 2016 at 11:11 AM, Kostya Serebryany via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

>
>
> On Fri, Feb 5, 2016 at 6:21 AM, Hahnfeld, Jonas via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hi all,
>>
>> I'm currently looking into (optionally) switching the default C++ stdlib
>> to
>> libc++ (see http://reviews.llvm.org/D15920 which hasn't received a
>> review so
>> far)
>> I've resolved all regression test failures in clang which are now passing
>> cleanly.
>>
>> I'm now investigating the failing sanitizer tests in compiler-rt, here's
>> what I got so far:
>>  - two tests use -static-libstdc++ which obviously needs a
>> -stdlib=libstdc++
>> (asan/TestCases/throw_invoke_test.cc and tsan/static_init6.cc)
>>
>
> Makes sense.
> I wonder if we can also use -static-libc++ for these tests
>
>
>>  - tsan builds an instrumented version of libc++ and adds their headers.
>> This leads to errors with default C headers which are #include_next'd in
>> libc++. These #include_next then find the headers of the "normal" libc++
>> which in turn instantly return because of the header guards. Therefore
>> basic
>> functions like printf aren't defined.
>> Solution: Pass -nostdinc++ to disable the headers of the "normal" libc++
>>
>
> emm, probably.
>

Just to clarify: do you want to pass it to TSan lit tests? How would you
ensure that
we'll still pick up C++ standard library headers when tests are run with
Clang configured
to use libstdc++?


>
>
>>  - lsan completely fails with libc++, I had to generally pass
>> -stdlib=libstdc++ - is this known and possibly still work in progress?
>>
>
> This is not known to me. What are the symptoms?
>
>
>>
>> Greetings,
>> Jonas
>>
>> --
>> Jonas Hahnfeld, MATSE-Auszubildender
>>
>> IT Center
>> Group: High Performance Computing
>> Division: Computational Science and Engineering
>> RWTH Aachen University
>> Seffenter Weg 23
>> D 52074  Aachen (Germany)
>> Hahnfeld at itc.rwth-aachen.de
>> www.itc.rwth-aachen.de
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>


-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160205/c6ff7bd2/attachment.html>


More information about the cfe-dev mailing list