public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/99190] New: Undefined behaviour in libubsan
@ 2021-02-22  8:09 zeccav at gmail dot com
  2021-02-22  8:16 ` [Bug sanitizer/99190] " jakub at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zeccav at gmail dot com @ 2021-02-22  8:09 UTC (permalink / raw)
  To: gcc-bugs

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;
}

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-02-23 16:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  8:09 [Bug sanitizer/99190] New: Undefined behaviour in libubsan zeccav at gmail dot com
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

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