NetBSD-Bugs archive

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

Re: toolchain/54090: gcc -fsanitize=address creates an unusable binary on amd64



The following reply was made to PR toolchain/54090; it has been noted by GNATS.

From: Kamil Rytarowski <n54%gmx.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: toolchain/54090: gcc -fsanitize=address creates an unusable
 binary on amd64
Date: Sun, 31 Mar 2019 10:52:15 +0200

 On 31.03.2019 03:10, Rin Okuyama wrote:
 > The following reply was made to PR toolchain/54090; it has been noted by=
  GNATS.
 >
 > From: Rin Okuyama <rokuyama.rk%gmail.com@localhost>
 > To: gnats-bugs%netbsd.org@localhost, alnsn%netbsd.org@localhost
 > Cc:
 > Subject: Re: toolchain/54090: gcc -fsanitize=3Daddress creates an unusab=
 le
 >  binary on amd64
 > Date: Sun, 31 Mar 2019 10:05:33 +0900
 >
 >  detect_leaks, which is turned on default for amd64, is currently broken=
 .
 >  You can disable it by setting ASAN_OPTIONS to detect_leaks=3Dfalse
 >
 >  % uname -a
 >  NetBSD latipes 8.99.36 NetBSD 8.99.36 (AMD64) #0: Fri Mar 22 19:13:47 J=
 ST 2019  rin@latipes:/build/src/sys/arch/amd64/compile/AMD64 amd64
 >  % gcc -fsanitize=3Daddress hello.c -o hello.asan
 >  % ./hello.asan
 >  Hello, World!
 >  ASAN:DEADLYSIGNAL
 >  ^C
 >  % ASAN_OPTIONS=3Ddetect_leaks=3Dfalse ./hello.asan
 >  Hello, World!
 >
 >  Options for asan/lsan are described here
 >
 >  https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
 >  https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer
 >
 >
 
 For the record, fully upstreamed sanitizers landed LLVM 8.0 and will be
 acquired together with something like GCC 10.
 
 LSan isn't ported right now. I'm working on improving the ptrace(2)
 support that is the foundation used in this sanitizer (even if we will
 add a custom kernel API for the StopTheWorld() mechanism).
 
 If this is enough, I propose to disable detect_leaks unconditionally and
 leave it for future.
 


Home | Main Index | Thread Index | Old Index