public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Uecker <muecker@gwdg.de>
To: "Martin Liška" <mliska@suse.cz>, gcc@gcc.gnu.org
Subject: Re: new ubsan handler
Date: Mon, 19 Dec 2022 16:43:23 +0100	[thread overview]
Message-ID: <b2d060da3895d340e0fa57b019d415cc995afab9.camel@gwdg.de> (raw)
In-Reply-To: <7aa27181-1e01-5711-7080-f50ad90d58be@suse.cz>

Am Montag, dem 19.12.2022 um 15:22 +0100 schrieb Martin Liška:
> On 12/19/22 10:25, Martin Uecker wrote:
> > Am Montag, dem 19.12.2022 um 09:44 +0100 schrieb Martin Liška:
> > > On 12/17/22 20:35, Martin Uecker wrote:
> > > > 
> > > > 
> > > > Hi all,
> > > > 
> > > > what is the process for adding a new UBsan handler?
> > > 
> > > Hello.
> > > 
> > > Yes, we sync the run-time library from LLVM project. So a new
> > > sanitizer
> > > should go there first.
> > > 
> > > > 
> > > > We have the source in the GCC tree, but I guess this
> > > > should go via LLVM?
> > > 
> > > And the compiler support (instrumentation) is independent.
> > 
> > Thanks Martin!
> > 
> > Does it make sense to send the full patch (with changes
> > to the compiler and library) to gcc-patches first for
> > review?
> 
> Yep, please CC me.
> 
> > 
> > I am working on a patch that calls a handler when bounds
> > for VM-types do not match on assignment.
> 
> Nice. So basically something like -fsanitize=bounds/bounds-
> strict/object-size ?

Yes, it would diagnose the following mismatch
and other similar cases:

int a[10];
int n = 5;
char (*p)[n] = &a;


Martin











      reply	other threads:[~2022-12-19 15:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-17 19:35 Martin Uecker
2022-12-19  8:44 ` Martin Liška
2022-12-19  9:25   ` Martin Uecker
2022-12-19 14:22     ` Martin Liška
2022-12-19 15:43       ` Martin Uecker [this message]

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=b2d060da3895d340e0fa57b019d415cc995afab9.camel@gwdg.de \
    --to=muecker@gwdg.de \
    --cc=gcc@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /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).