bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gprofng/32096] New: UBSAN issues in gprofng


From: sam at gentoo dot org
Subject: [Bug gprofng/32096] New: UBSAN issues in gprofng
Date: Sun, 18 Aug 2024 08:32:46 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=32096

            Bug ID: 32096
           Summary: UBSAN issues in gprofng
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gprofng
          Assignee: vladimir.mezentsev at oracle dot com
          Reporter: sam at gentoo dot org
            Blocks: 32092
  Target Milestone: ---

Created attachment 15673
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15673&action=edit
gprofng.log

When looking at PR32092, I tried building with UBSAN in case it showed
anything. It showed a lot!

Build with C{,XX}FLAGS="-O2 -flto=jobserver -fsanitize=undefined" and
LDFLAGS="-fsanitize=undefined". I used 
unreleased GCC 15 (gcc-15 (Gentoo Hardened 15.0.9999 p, commit
70f5adef33e0620d934fc7fb0822e592e3ff04a1) 15.0.0 20240814 (experimental)
10972e6fb59cf83e12dcf7d5d6db01aa8e38dc52) but I can reproduce with 14 too. I
didn't get any UBSAN issues without LTO.

As a horrible local hack to workaround PR32095, because I only needed to run
one test (for PR32092), I did:
```
--- a/gprofng/testsuite/gprofng.display/display.exp
+++ b/gprofng/testsuite/gprofng.display/display.exp
@@ -51,8 +51,6 @@ if { "$CHECK_TARGET" == "check-extra" || "$CHECK_TARGET" ==
"check-install" } {
 } else {  # "$CHECK_TARGET" is "check" or "check-DEJAGNU"
 #         dir       cflags     gprofflags     tflags
     set table {
-      {"jsynprog" "-g -Wall" "-p on -j on"  "-j add_int"}
-      {"mttest"   "-g -O0"   "-p on"        "-j calladd"}
       {"synprog"  "-g -O0"   "-p on"        "cpu"}
     }
 }
``

and
```
$ export UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=0"
$
LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/15/libasan.so:/usr/lib/gcc/x86_64-pc-linux-gnu/15/libubsan.so
make RUNTESTFLAGS="display.exp=synprog" check
````


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=32092
[Bug 32092] gprofng testsuite fails with -flto (ERROR: comparison of results in
synprog failed)
-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]