public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/98109] Seemingly wrong warnings from -Wnonnull when combined with -O2 -fsanitize=undefined
Date: Mon, 01 Aug 2022 22:01:50 +0000 [thread overview]
Message-ID: <bug-98109-4-d2ntEb1vVr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98109-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98109
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Bernd Buschinski from comment #4)
> Can someone tell me if this should be a new bug or is just a duplicate?
It's the same bug. The sanitizer transforms the source code into the following
IR (note the 0B argument to my_memmem):
<bb 8> [local count: 390331996]:
if (str_path$buffer_7 == 0B)
goto <bb 9>; [0.00%]
else
goto <bb 14>; [100.00%]
<bb 9> [count: 0]:
__builtin___ubsan_handle_nonnull_arg (&*.Lubsan_data2);
_12 = my_memmem (0B, str_path$length_11, ".abcd", 5); <<< warning here
if (_12 != 0B)
goto <bb 18>; [54.59%]
else
goto <bb 19>; [45.41%]
prev parent reply other threads:[~2022-08-01 22:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 22:54 [Bug middle-end/98109] New: " gabravier at gmail dot com
2020-12-03 1:08 ` [Bug middle-end/98109] " msebor at gcc dot gnu.org
2021-05-19 10:44 ` jlegg at feralinteractive dot com
2021-05-19 16:02 ` msebor at gcc dot gnu.org
2022-07-31 9:02 ` b.buschinski at googlemail dot com
2022-08-01 22:01 ` msebor at gcc dot gnu.org [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=bug-98109-4-d2ntEb1vVr@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).