public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "zeccav at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/99190] New: Undefined behaviour in libubsan
Date: Mon, 22 Feb 2021 08:09:40 +0000	[thread overview]
Message-ID: <bug-99190-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190

            Bug ID: 99190
           Summary: Undefined behaviour in libubsan
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zeccav 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, marxin at gcc dot gnu.org
  Target Milestone: ---

// gcc -fsanitize=shift -w
// ldd a.out produces
// libubsan.so.1 => /home/vitti/local/gcc-150221-undefined/lib64/libubsan.so.1
// ./a.out produces
// ../../../../gcc-150221/libsanitizer/ubsan/ubsan_value.cpp:77:25: runtime
error: left shift of 0x0000000000000000fffffffffffffffb by 96 places cannot be
represented in type '__int128'
// ubsan_value.cpp:77 -> "return SIntMax(Val) << ExtraBits >> ExtraBits;"
int main (void)
{

  1 << -5;

  return 0;
}

             reply	other threads:[~2021-02-22  8:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-22  8:09 zeccav at gmail dot com [this message]
2021-02-22  8:16 ` [Bug sanitizer/99190] " jakub at gcc dot gnu.org
2021-02-22  9:47 ` marxin at gcc dot gnu.org
2021-02-22 15:17 ` marxin at gcc dot gnu.org
2021-02-22 15:52 ` zeccav at gmail dot com
2021-02-22 16:15 ` zeccav at gmail dot com
2021-02-23  9:14 ` marxin at gcc dot gnu.org
2021-02-23 10:16 ` marxin at gcc dot gnu.org
2021-02-23 16:30 ` zeccav at gmail dot com

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