Re: Can gcc itself be tested with ubsan? If so, how?

2021-10-01 Thread Gary Oblock via Gcc
I suppose I should answer my own question Yes, the final compiler built has ubsan enabled. Gary PS. The faint hearted should note this is an overnight build. It would be nice if this wasn't tied to building a bootstrap compiler. From: Gary Oblock Sent:

Re: Can gcc itself be tested with ubsan? If so, how?

2021-09-29 Thread Gary Oblock via Gcc
Toon, I assume the final compiler built this way has ubsan? I ask because I'm trying to spot a bug in a new optimization so I want to run it on a specific test case with the new optimization enabled. Thanks, Gary From: Toon Moene Sent: Monday, September 27,

Re: Can gcc itself be tested with ubsan? If so, how?

2021-09-28 Thread Eric Gallager via Gcc
On Tue, Sep 28, 2021 at 2:48 AM Toon Moene wrote: > > On 9/28/21 8:35 AM, Erick Ochoa via Gcc wrote: > > >> Can ubsan be used on the compiler itself? > > I regularly build the compiler(s) natively with ubsan enabled, see for > instance: > >

Re: Can gcc itself be tested with ubsan? If so, how?

2021-09-28 Thread Toon Moene
On 9/28/21 8:35 AM, Erick Ochoa via Gcc wrote: Can ubsan be used on the compiler itself? I regularly build the compiler(s) natively with ubsan enabled, see for instance: https://gcc.gnu.org/pipermail/gcc-testresults/2021-September/719448.html The configure line tells you how to do it

Re: Can gcc itself be tested with ubsan? If so, how?

2021-09-28 Thread Erick Ochoa via Gcc
Hi, just as a note. This is also of interest to me. I have wanted to compile a single pass that I wrote using ubsan/other sanitizers for testing purposes. I was wondering if someone has already modified the build system to use ubsan to test their passes and if they could document the process for

Can gcc itself be tested with ubsan? If so, how?

2021-09-27 Thread Gary Oblock via Gcc
I tried just adding "-fsanitize=undefined" to my CXX_FLAGS and got a bunch of errors like this: /usr/bin/ld: ../libcody/libcody.a(server.o): in function `std::__cxx11::basic_string, std::allocator >::_Alloc_hider::~_Alloc_hider()': /usr/include/c++/9/bits/basic_string.h:150: undefined reference