From: Joseph Myers <joseph@codesourcery.com>
To: Martin Uecker <uecker@tugraz.at>
Cc: gcc-patches@gcc.gnu.org, "Martin Liška" <mliska@suse.cz>
Subject: Re: [C PATCH 3/4] introduce ubsan checking for assigment of VM types 3/4
Date: Tue, 30 May 2023 22:59:35 +0000 [thread overview]
Message-ID: <77865f49-763-1ecf-36a7-e7bc21b2e0e2@codesourcery.com> (raw)
In-Reply-To: <6a868211b3892c5c9161eb5fae908195eec728ce.camel@tugraz.at>
On Mon, 29 May 2023, Martin Uecker via Gcc-patches wrote:
> Support instrumentation of function arguments for functions
> called via a declaration. We can support only simple size
What do you mean by "via a declaration"?
If the *definition* is visible (and known to be the definition used at
runtime rather than being interposed) then you can determine in some cases
that there is UB from bad bounds. If only some other declaration is
visible, or the definition might be interposed, VLA sizes in the
declaration are equivalent to [*]; it's suspicious if they don't match,
but it's not UB and so it would seem rather questionable for UBSan to
treat it as such (cf. the rejection in GCC of sanitization for some
questionable cases of unsigned integer overflow that aren't UB either).
> + /* Give up. If we do not understand a size expression, we can
> + also not instrument any of the others because it may have
> + side effects affecting them. (We could restart and instrument
> + the only the ones with integer constants.) */
> + warning_at (location, 0, "Function call not instrumented.");
> + return void_node;
This is not a properly formatted diagnostic message (should start with a
lowercase letter and not end with '.').
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2023-05-30 22:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-29 10:19 [C PATCH 1/4] introduce ubsan checking for assigment of VM types 1/4 Martin Uecker
2023-05-29 10:20 ` [C PATCH 2/4] introduce ubsan checking for assigment of VM types 2/4 Martin Uecker
2023-05-29 10:22 ` [C PATCH 3/4] introduce ubsan checking for assigment of VM types 3/4 Martin Uecker
2023-05-30 22:59 ` Joseph Myers [this message]
2023-05-31 8:12 ` Martin Uecker
2023-05-29 10:22 ` [C PATCH 4/4] introduce ubsan checking for assigment of VM types 4/4 Martin Uecker
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=77865f49-763-1ecf-36a7-e7bc21b2e0e2@codesourcery.com \
--to=joseph@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mliska@suse.cz \
--cc=uecker@tugraz.at \
/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).