public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Erick Ochoa <eochoa@gcc.gnu.org>
To: Gary Oblock <gary@amperecomputing.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Can gcc itself be tested with ubsan? If so, how?
Date: Tue, 28 Sep 2021 08:35:22 +0200	[thread overview]
Message-ID: <CAJ_nqzgPJFCTFtminRkCC=4NH5p6hAu0OY+fCjVFahbE6kgzog@mail.gmail.com> (raw)
In-Reply-To: <BYAPR01MB546428AA7E4B82C5F652E210C6A79@BYAPR01MB5464.prod.exchangelabs.com>

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.

  reply	other threads:[~2021-09-28  6:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27 23:00 Gary Oblock
2021-09-28  6:35 ` Erick Ochoa [this message]
2021-09-28  6:47   ` Toon Moene
2021-09-28 10:53     ` Eric Gallager
2021-09-29 18:55     ` Gary Oblock
2021-10-01 20:11       ` Gary Oblock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ_nqzgPJFCTFtminRkCC=4NH5p6hAu0OY+fCjVFahbE6kgzog@mail.gmail.com' \
    --to=eochoa@gcc.gnu.org \
    --cc=gary@amperecomputing.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).