Bug#892096: gcc-snapshot: AddressSanitizer uses glibc internal functions

2018-03-20 Thread Vincent Lefevre
On 2018-03-20 01:06:50 +0100, Vincent Lefevre wrote:
> Control: forwarded -1 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84761
> Control: tags -1 fixed-upstream
> 
> in the sense that this will be OK at least up to glibc 2.27.
> 
> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84761#c9
> 
> Author: jakub
> Date: Mon Mar 19 20:47:29 2018
> New Revision: 258663
> 
> URL: https://gcc.gnu.org/viewcvs?rev=258663=gcc=rev
> Log:
>   PR sanitizer/84761
>   * sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ):
>   Define if not defined.
>   (DL_INTERNAL_FUNCTION): Don't define.
>   (InitTlsSize): For __i386__ if not compiled against glibc 2.27+
>   determine at runtime whether to use regparm(3), stdcall calling
>   convention for older glibcs or normal calling convention for
>   newer glibcs for call to _dl_get_tls_static_info.
> 
> Modified:
> trunk/libsanitizer/ChangeLog
> trunk/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc

I confirm that gcc-snapshot 1:20180320-1 in experimental fixes the
problem.

Thanks,

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#892096: gcc-snapshot: AddressSanitizer uses glibc internal functions

2018-03-19 Thread Vincent Lefevre
Control: forwarded -1 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84761
Control: tags -1 fixed-upstream

in the sense that this will be OK at least up to glibc 2.27.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84761#c9

Author: jakub
Date: Mon Mar 19 20:47:29 2018
New Revision: 258663

URL: https://gcc.gnu.org/viewcvs?rev=258663=gcc=rev
Log:
PR sanitizer/84761
* sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ):
Define if not defined.
(DL_INTERNAL_FUNCTION): Don't define.
(InitTlsSize): For __i386__ if not compiled against glibc 2.27+
determine at runtime whether to use regparm(3), stdcall calling
convention for older glibcs or normal calling convention for
newer glibcs for call to _dl_get_tls_static_info.

Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/sanitizer_common/sanitizer_linux_libcdep.cc

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#892096: gcc-snapshot: AddressSanitizer uses glibc internal functions

2018-03-14 Thread Vincent Lefevre
Control: reopen -1

On 2018-03-14 10:27:35 +0100, Vincent Lefevre wrote:
> On 2018-03-14 09:20:17 +0100, Matthias Klose wrote:
> > now built using glibc-2.27.
> 
> Which version? FYI, I still obtain a crash with 201803012-1.

Reopening since 201803012-1 depends on libc6 (>= 2.27), thus has
presumely been built with glibc-2.27:

cventin:~> dpkg -s gcc-snapshot | grep Depends:
Depends: binutils (>= 2.30), libc6-dev-i386 (>= 2.11), libc6-dev-x32 (>= 2.11), 
libc6-dev (>= 2.13-5), lib32z1 (>= 1:1.1.4), libc6 (>= 2.27), libc6-i386 (>= 
2.27), libc6-x32 (>= 2.27), libgc1c2 (>= 1:7.2d), libgmp10 (>= 2:5.0.1~), 
libisl15 (>= 0.15), libmpc3, libmpfr6 (>= 3.1.3), zlib1g (>= 1:1.1.4), python

And I still get the same error:

cventin:~> gcc-snapshot -m32 -fsanitize=address tst.c -o tst
cventin:~> ./tst
AddressSanitizer:DEADLYSIGNAL
=
==8875==ERROR: AddressSanitizer: SEGV on unknown address 0xf7f29e70 (pc 
0xf7f29e84 bp 0xff97c77c sp 0xff97c73c T16777215)
==8875==The signal is caused by a WRITE memory access.
#0 0xf7f29e83 in _dl_get_tls_static_info (/lib/ld-linux.so.2+0x11e83)
#1 0xf7a43b19  (/usr/lib/gcc-snapshot/lib32/libasan.so.5+0x10cb19)
#2 0xf7a32787  (/usr/lib/gcc-snapshot/lib32/libasan.so.5+0xfb787)
#3 0xf7f2791a  (/lib/ld-linux.so.2+0xf91a)
#4 0xf7f18cb9  (/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
==8875==ABORTING

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Bug#892096: gcc-snapshot: AddressSanitizer uses glibc internal functions

2018-03-14 Thread Vincent Lefevre
On 2018-03-14 09:20:17 +0100, Matthias Klose wrote:
> now built using glibc-2.27.

Which version? FYI, I still obtain a crash with 201803012-1.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)