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

Bug#892096: gcc-snapshot: AddressSanitizer /usr/lib/gcc-snapshot/lib32/libasan.so.5 is broken: SEGV



Package: gcc-snapshot
Version: 20180216-1
Severity: important

On a program that does nothing, the AddressSanitizer segfaults with
the 32-bit ABI. This is a regression.

I have the following gcc-snapshot script:

#!/bin/sh
LD_LIBRARY_PATH=/usr/lib/gcc-snapshot/lib:$LD_LIBRARY_PATH
PATH=/usr/lib/gcc-snapshot/bin:$PATH
rpath=""
OLD_IFS="$IFS"
IFS=:
for i in $LD_RUN_PATH
do
  rpath="$rpath -Wl,-rpath -Wl,$i"
done
IFS="$OLD_IFS"
exec gcc -Wl,-rpath -Wl,/usr/lib/gcc-snapshot/lib \
         -Wl,-rpath -Wl,/usr/lib/gcc-snapshot/lib32 \
         -Wl,-rpath -Wl,/usr/lib/gcc-snapshot/libx32 $rpath "$@"

cventin:~> cat tst.c
int main (void)
{
  return 0;
}
cventin:~> gcc-snapshot -m32 -fsanitize=address tst.c -o tst
cventin:~> ./tst
AddressSanitizer:DEADLYSIGNAL
=================================================================
==25032==ERROR: AddressSanitizer: SEGV on unknown address 0xf7fa7e70 (pc 0xf7fa7e84 bp 0xffbf40ac sp 0xffbf406c T16777215)
==25032==The signal is caused by a WRITE memory access.
    #0 0xf7fa7e83 in _dl_get_tls_static_info (/lib/ld-linux.so.2+0x11e83)
    #1 0xf7ac147d  (/usr/lib/gcc-snapshot/lib32/libasan.so.5+0x10e47d)
    #2 0xf7aafd27  (/usr/lib/gcc-snapshot/lib32/libasan.so.5+0xfcd27)
    #3 0xf7fa591a  (/lib/ld-linux.so.2+0xf91a)
    #4 0xf7f96cb9  (/lib/ld-linux.so.2+0xcb9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/ld-linux.so.2+0x11e83) in _dl_get_tls_static_info
==25032==ABORTING

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gcc-snapshot depends on:
ii  binutils        2.30-5
ii  lib32z1         1:1.2.8.dfsg-5
ii  libc6           2.27-1
ii  libc6-dev       2.27-1
ii  libc6-dev-i386  2.27-1
ii  libc6-dev-x32   2.27-1
ii  libc6-i386      2.27-1
ii  libc6-x32       2.27-1
ii  libgc1c2        1:7.4.2-8.1
ii  libgmp10        2:6.1.2+dfsg-2
ii  libisl15        0.18-1
ii  libmpc3         1.1.0-1
ii  libmpfr6        4.0.1-1
ii  python          2.7.14-4
ii  zlib1g          1:1.2.8.dfsg-5

gcc-snapshot recommends no packages.

Versions of packages gcc-snapshot suggests:
ii  binutils [binutils-gold]  2.30-5

-- no debconf information


Reply to: