https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
--- Comment #8 from Vittorio Zecca ---
I can confirm the new libubsan works on my test case.
Keep up the good work!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
Martin Liška changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
Martin Liška changed:
What|Removed |Added
URL||https://reviews.llvm.org/D9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
--- Comment #5 from Vittorio Zecca ---
Sorry I meant libubsan, but I am building the whole gcc, g++, and gfortran
sanitized version.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
--- Comment #4 from Vittorio Zecca ---
To generate a sanitized version of libgfortran I built whole sanitized
gcc with the following command:
CFLAGS="-g -O0 -fsanitize=undefined -lubsan" LIBS="-lubsan"
CXXFLAGS=$CFLAGS ../gcc-150221/configure
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
--- Comment #3 from Martin Liška ---
Interesting, you are searching for UBSAN in libsanitizer.
Can you please share details how do you build libubsan with -fsanitize=shift?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
Martin Liška changed:
What|Removed |Added
Ever confirmed|0 |1
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99190
--- Comment #1 from Jakub Jelinek ---
It is UB only in C++17 or earlier, so one way to "fix" it is build libubsan
with -std=gnu++20.
Or the SIntMax(Val) << ExtraBits >> ExtraBits can be replaced by
SIntMax(UIntMax(Val) << ExtraBits) >> ExtraBits.