public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* pointers to variable-length arrays - undefined behavior sanitizer
@ 2018-03-27 16:30 Uecker, Martin
  0 siblings, 0 replies; only message in thread
From: Uecker, Martin @ 2018-03-27 16:30 UTC (permalink / raw)
  To: gcc; +Cc: joseph, polacek


Hi,

I want to add run-time support for checking for equality of
the size expressions where pointers to variable-length arrays
are required to be compatible.

I wonder if you could give some advise on how to approach
this. One general question is where this should be added.
For example, I think it would be easy to instrument
function calls in gcc/ubsan.c . My initial attempt does
not work though because accessing the size expressions
seems to confuse the SSA renaming (or so I think). But maybe
it would be better to add this in the frontend anyway.
One could add additional options for comptypes and similar
functions to return an  instrument_expr  (similar to 
pointer_diff) and use this when building the relevant
expressions. Any thoughts or advise would be highly
appreciated.

Martin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-27 16:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27 16:30 pointers to variable-length arrays - undefined behavior sanitizer Uecker, Martin

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).