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 doing so. For these purposes, I don't really care if it can be done only without bootstrapping. I haven't investigated enough to find out if it is possible, but I suspect it is and may have already been done.
Thanks! On Tue, 28 Sept 2021 at 01:01, Gary Oblock via Gcc <gcc@gcc.gnu.org> wrote: > > 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<char, std::char_traits<char>, > std::allocator<char> >::_Alloc_hider::~_Alloc_hider()': > /usr/include/c++/9/bits/basic_string.h:150: undefined reference to > `__ubsan_handle_type_mismatch_v1' > > They all seemed library related. > > Can ubsan be used on the compiler itself? > > Thanks, > > Gary > > > > > CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is > for the sole use of the intended recipient(s) and contains information that > is confidential and proprietary to Ampere Computing or its subsidiaries. It > is to be used solely for the purpose of furthering the parties' business > relationship. Any unauthorized review, copying, or distribution of this email > (or any attachments thereto) is strictly prohibited. If you are not the > intended recipient, please contact the sender immediately and permanently > delete the original and any copies of this email and any attachments thereto.