Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1667885

Summary: liblsan_preinit.o missing in devtoolset-8
Product: Red Hat Developer Toolset Reporter: Harald Achitz <harald.achitz>
Component: gccAssignee: Marek Polacek <mpolacek>
Status: CLOSED ERRATA QA Contact: Michael Petlan <mpetlan>
Severity: high Docs Contact:
Priority: unspecified    
Version: DTS 8.1 RHEL 7CC: bugproxy, hannsj_uhl, harald.achitz, jakub, kanderso, law, mcermak, mnewsome, mpetlan, ohudlick
Target Milestone: alphaKeywords: Patch
Target Release: 8.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: devtoolset-8-gcc-8.3.1-2.el7 Doc Type: Bug Fix
Doc Text:
Previously, devtoolset-8-gcc wasn't shipping liblsan_preinit.o, which could result in errors when linking when -fsanitize=leak was in effect. The object file has been added and linking with -fsanitize=leak works as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-11 10:23:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1598750, 1660905, 1696615    

Description Harald Achitz 2019-01-21 10:43:43 UTC
Description of problem:
Leak sanatizer build do not work because of missing liblsan_preinit.o

Version-Release number of selected component (if applicable):
gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)

How reproducible:
create a C++ binary, build for leak sanatizer, watch the build (linking) fail

Steps to Reproduce:
1. create a C++ program  
2. compile with -fsanitize=leak -fno-omit-frame-pointer
3. linking will fail, 
/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/ld: cannot find liblsan_preinit.o: No such file or directory


Actual results:
no binary generated

Expected results:
a generated binary which I can execute and get leak sanitizer result

Additional info:
all packages of devtoolset 8 are installed, 
this is a Red Hat Enterprise Linux Developer Suite, 7.6 installation 
I guess the file liblsan_preinit.o should be part of devtoolset-8-gcc, 
like others, for example /opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/32/libasan_preinit.o,
but it is not there


> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
> Target: x86_64-redhat-linux
> Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-8.2.1-20180905/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
> Thread model: posix
> gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)

Comment 2 Marek Polacek 2019-02-05 14:44:04 UTC
Will fix.

Comment 3 Marek Polacek 2019-02-05 20:35:40 UTC
Fixed in git.

Comment 5 Marek Polacek 2019-03-11 19:20:09 UTC
*** Bug 1687263 has been marked as a duplicate of this bug. ***

Comment 6 Michael Petlan 2019-04-05 11:55:05 UTC
Reproduced with devtoolset-8.0's gcc, works with devtoolset-8-gcc-8.3.1-3.
On powerpc, I have found another issue with liblsan, filed as bz1696615.

VERIFIED.

Comment 8 errata-xmlrpc 2019-06-11 10:23:04 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1446