public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bic60176 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/115156] New: [14 Regression] passing zero to __builtin_clzl() check missing Date: Sun, 19 May 2024 08:47:36 +0000 [thread overview] Message-ID: <bug-115156-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115156 Bug ID: 115156 Summary: [14 Regression] passing zero to __builtin_clzl() check missing Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: bic60176 at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- OS: Ubuntu 22.04.3 LTS UBSAN missed checking if zero is passed to __builtin_clzl() when compiling with gcc-14.1.0. testcase: ``` #include<stdint.h> void main() { int32_t b = 0; (__builtin_clzl(b), 3) && b; // __builtin_clzl(b); /* gcc-14 can detect this one */ } ``` $ ../compiler-builds/gcc-14.1.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s testcase.c -o exec $ ./exec 2>exec.err $ cat exec.err $ ../compiler-builds/gcc-13.2.0_build/bin/gcc -fsanitize=undefined -g -lgcc_s testcase.c -o exec $ ./exec 2>exec.err $ cat exec.err testcase.c:5:4: runtime error: passing zero to clz(), which is not a valid argument
next reply other threads:[~2024-05-19 8:47 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-19 8:47 bic60176 at gmail dot com [this message] 2024-05-19 9:47 ` [Bug sanitizer/115156] " pinskia at gcc dot gnu.org 2024-05-19 9:47 ` [Bug sanitizer/115156] [14/15 " pinskia at gcc dot gnu.org 2024-05-19 15:14 ` jakub at gcc dot gnu.org
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-115156-4@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: linkBe 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).