public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++
@ 2012-11-18  1:10 hjl.tools at gmail dot com
  2012-11-18  1:18 ` [Bug other/55374] " hjl.tools at gmail dot com
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-18  1:10 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

             Bug #: 55374
           Summary: [asan] Can't link static libasan with static libstdc++
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com


On hjl/asan git branch, under Linux/x86-64, configured with

--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
--enable-languages=c,c++  --prefix=/usr/gcc-4.8.0
--with-local-prefix=/usr/local --enable-gnu-indirect-function --disable-werror
--with-build-config=bootstrap-asan --with-fpmath=sse

I got

/export/build/gnu/gcc-asan/build-x86_64-linux/./prev-gcc/g++
-B/export/build/gnu/gcc-asan/build-x86_64-linux/./prev-gcc/
-B/usr/gcc-4.8.0/x86_64-unknown-linux-gnu/bin/ -nostdinc++
-B/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-B/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs
-I/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-I/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include
-I/export/gnu/import/git/sources/gcc/libstdc++-v3/libsupc++
-L/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
  -g -O2 -faddress-sanitizer -DIN_GCC   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -faddress-sanitizer -static-libasan  -o cc1
c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o
c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o
c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
tree-mudflap.o i386-c.o glibc-c.o \
  cc1-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a
libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp
-rdynamic  -lz
/usr/local/bin/ld: error:
/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/libasan.a(asan_new_delete.o):
multiple definition of 'operator delete(void*)'
/usr/local/bin/ld:
/export/build/gnu/gcc-asan/build-x86_64-linux/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(del_op.o):
previous definition here
collect2: error: ld returned 1 exit status


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug other/55374] [asan] Can't link static libasan with static libstdc++
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
@ 2012-11-18  1:18 ` hjl.tools at gmail dot com
  2012-11-18  1:30 ` hjl.tools at gmail dot com
                   ` (27 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-18  1:18 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-18 01:18:07 UTC ---
-Bstatic -lasan -Bdynamic must be placed before -Bstatic -lstdc++ -Bdynamic.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug other/55374] [asan] Can't link static libasan with static libstdc++
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
  2012-11-18  1:18 ` [Bug other/55374] " hjl.tools at gmail dot com
@ 2012-11-18  1:30 ` hjl.tools at gmail dot com
  2012-12-08 17:06 ` [Bug sanitizer/55374] [asan] Wrong linking order of libasan and libstdc++ hjl.tools at gmail dot com
                   ` (26 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-18  1:30 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-18 01:29:57 UTC ---
Even without -static-libasan, shouldn't -lasan be placed before
-lstdc++?

[hjl@gnu-tools-1 prev-gcc]$ ./g++ -B./  -faddress-sanitizer x.o
-B../prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/
-B../prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/ -v
Reading specs from ./specs
COLLECT_GCC=./g++
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/sources/gcc/configure
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
--enable-languages=c,c++ --prefix=/usr/gcc-4.8.0 --with-local-prefix=/usr/local
--enable-gnu-indirect-function --disable-werror
--with-build-config=bootstrap-asan --with-fpmath=sse
Thread model: posix
gcc version 4.8.0 20121117 (experimental) (GCC) 
COMPILER_PATH=./:../prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/:../prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/
LIBRARY_PATH=./:../prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/:../prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' './' '-faddress-sanitizer' '-B'
'../prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs/' '-B'
'../prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/' '-v'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 ./collect2 --eh-frame-hdr -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 /lib/../lib64/crt1.o /lib/../lib64/crti.o
./crtbegin.o -L. -L../prev-x86_64-unknown-linux-gnu/libsanitizer/asan/.libs
-L../prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/lib/../lib64
-L/usr/lib/../lib64 x.o -lstdc++ -lm -lasan -lgcc_s -lgcc -lc -lgcc_s -lgcc
./crtend.o /lib/../lib64/crtn.o
[hjl@gnu-tools-1 prev-gcc]$


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] Wrong linking order of libasan and libstdc++
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
  2012-11-18  1:18 ` [Bug other/55374] " hjl.tools at gmail dot com
  2012-11-18  1:30 ` hjl.tools at gmail dot com
@ 2012-12-08 17:06 ` hjl.tools at gmail dot com
  2012-12-08 17:09 ` [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work hjl.tools at gmail dot com
                   ` (25 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-08 17:06 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-12-08 17:05:51 UTC ---
[hjl@gnu-6 gcc]$ cat /tmp/bad.cc
#include <new>

int
main ()
{
  int *buf = new int(30);
  buf[30]=1;
  return 0;
}
[hjl@gnu-6 gcc]$ ./release/usr/gcc-4.8.0/bin/g++ -fsanitize=address /tmp/bad.cc
-static-libasan -static-libstdc++
/export/build/gnu/gcc/release/usr/gcc-4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib64/libasan.a(asan_new_delete.o):
In function `operator new(unsigned long)':
/export/gnu/import/git/gcc/libsanitizer/asan/asan_new_delete.cc:41: multiple
definition of `operator new(unsigned long)'
/export/build/gnu/gcc/release/usr/gcc-4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib64/libstdc++.a(new_op.o):/export/gnu/import/git/gcc/libstdc++-v3/libsupc++/new_op.cc:45:
first defined here
/export/build/gnu/gcc/release/usr/gcc-4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib64/libasan.a(asan_new_delete.o):
In function `operator delete(void*)':
/export/gnu/import/git/gcc/libsanitizer/asan/asan_new_delete.cc:54: multiple
definition of `operator delete(void*)'
/export/build/gnu/gcc/release/usr/gcc-4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../lib64/libstdc++.a(del_op.o):/export/gnu/import/git/gcc/libstdc++-v3/libsupc++/del_op.cc:46:
first defined here
collect2: error: ld returned 1 exit status
[hjl@gnu-6 gcc]$


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2012-12-08 17:06 ` [Bug sanitizer/55374] [asan] Wrong linking order of libasan and libstdc++ hjl.tools at gmail dot com
@ 2012-12-08 17:09 ` hjl.tools at gmail dot com
  2012-12-08 17:11 ` hjl.tools at gmail dot com
                   ` (24 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-08 17:09 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.8.0
            Summary|[asan] Wrong linking order  |[asan] -static-libasan
                   |of libasan and libstdc++    |-static-libstdc++ doesn't
                   |                            |work


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2012-12-08 17:09 ` [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work hjl.tools at gmail dot com
@ 2012-12-08 17:11 ` hjl.tools at gmail dot com
  2012-12-20 19:11 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (23 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-08 17:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-11/msg01872.htm
                   |                            |l
   Last reconfirmed|                            |2012-12-08
     Ever Confirmed|0                           |1

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> 2012-12-08 17:11:16 UTC ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg01872.html


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2012-12-08 17:11 ` hjl.tools at gmail dot com
@ 2012-12-20 19:11 ` Joost.VandeVondele at mat dot ethz.ch
  2012-12-20 19:25 ` hjl.tools at gmail dot com
                   ` (22 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-12-20 19:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat
                   |                            |dot ethz.ch

--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-12-20 19:11:01 UTC ---
After applying your patch, I now get to the errors below.... any known
workaround ?

../../gcc/libiberty/regex.c:4497: error: undefined reference to
'__asan_report_store1'
../../gcc/libiberty/regex.c:4497: error: undefined reference to
'__asan_report_load1'
../../gcc/libiberty/regex.c:4497: error: undefined reference to
'__asan_report_load1'
../../gcc/libiberty/regex.c:4497: error: undefined reference to
'__asan_report_load1'
../../gcc/libiberty/regex.c:4493: error: undefined reference to
'__asan_report_load1'
../../gcc/libiberty/regex.c:4447: error: undefined reference to
'__asan_report_load8'
../../gcc/libiberty/regex.c:7682: error: undefined reference to
'__asan_report_store1'
../../gcc/libiberty/regex.c:7653: error: undefined reference to
'__asan_report_load8'
../../gcc/libiberty/regex.c:7725: error: undefined reference to
'__asan_report_store8'
../../gcc/libiberty/regex.c:7592: error: undefined reference to
'__asan_report_store8'
../../gcc/libiberty/regex.c:7505: error: undefined reference to
'__asan_report_load8'
../../gcc/libiberty/regex.c:4835: error: undefined reference to
'__asan_handle_no_return'
../../gcc/libiberty/regex.c:4688: error: undefined reference to
'__asan_report_store1'
../../gcc/libiberty/regex.c:4678: error: undefined reference to
'__asan_report_store1'
../../gcc/libiberty/regex.c:4598: error: undefined reference to
'__asan_report_load8'
../../gcc/libiberty/regex.c:4790: error: undefined reference to
'__asan_report_store8'
../../gcc/libiberty/regex.c:7424: error: undefined reference to
'__asan_handle_no_return'
../../gcc/libiberty/regex.c:6004: error: undefined reference to
'__asan_report_load4'
../../gcc/libiberty/regex.c:6745: error: undefined reference to
'__asan_report_store8'
../../gcc/libiberty/regex.c:6750: error: undefined reference to
'__asan_report_store4'
../../gcc/libiberty/regex.c:6750: error: undefined reference to
'__asan_report_store4'
../../gcc/libiberty/regex.c:6048: error: undefined reference to
'__asan_report_store4'
../../gcc/libiberty/regex.c:5985: error: undefined reference to
'__asan_report_store4'
../../gcc/libiberty/regex.c:7434: error: undefined reference to
'__asan_report_load4'
../../gcc/libiberty/regex.c:7434: error: undefined reference to
'__asan_report_load4'
../../gcc/libiberty/regex.c:7147: error: undefined reference to
'__asan_report_load4'
../../gcc/libiberty/regex.c:287: error: undefined reference to
'__asan_report_load2'
../../gcc/libiberty/regex.c:3292: error: undefined reference to
'__asan_report_load2'
../../gcc/libiberty/regex.c:3279: error: undefined reference to
'__asan_report_load2'
../../gcc/libiberty/regex.c:3295: error: undefined reference to
'__asan_report_load2'
../../gcc/libiberty/regex.c:8081: error: undefined reference to
'__asan_handle_no_return'
../../gcc/libiberty/regex.c:8126: error: undefined reference to
'__asan_unregister_globals'
../../gcc/libiberty/regex.c:8126: error: undefined reference to '__asan_init'
../../gcc/libiberty/regex.c:8126: error: undefined reference to
'__asan_register_globals'
../../gcc/libiberty/fopen_unlocked.c:129: error: undefined reference to
'__asan_init'
../../gcc/libiberty/safe-ctype.c:247: error: undefined reference to
'__asan_unregister_globals'
../../gcc/libiberty/safe-ctype.c:247: error: undefined reference to
'__asan_init'
../../gcc/libiberty/safe-ctype.c:247: error: undefined reference to
'__asan_register_globals'
../../gcc/libiberty/xmalloc.c:137: error: undefined reference to
'__asan_handle_no_return'
../../gcc/libiberty/xmalloc.c:184: error: undefined reference to
'__asan_unregister_globals'
../../gcc/libiberty/xmalloc.c:184: error: undefined reference to '__asan_init'
../../gcc/libiberty/xmalloc.c:184: error: undefined reference to
'__asan_register_globals'
../../gcc/libiberty/xstrerror.c:79: error: undefined reference to
'__asan_unregister_globals'
../../gcc/libiberty/xstrerror.c:79: error: undefined reference to
'__asan_register_globals'
collect2: error: ld returned 1 exit status
make[2]: *** [full-stamp] Error 1
make[2]: Leaving directory `/data/vjoost/gnu/gcc_trunk/obj/fixincludes'
make[1]: *** [all-fixincludes] Error 2
make[1]: *** Waiting for unfinished jobs....


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2012-12-20 19:11 ` Joost.VandeVondele at mat dot ethz.ch
@ 2012-12-20 19:25 ` hjl.tools at gmail dot com
  2012-12-20 19:55 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (21 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-20 19:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> 2012-12-20 19:24:49 UTC ---
(In reply to comment #5)
> After applying your patch, I now get to the errors below.... any known
> workaround ?
> 
> ../../gcc/libiberty/regex.c:4497: error: undefined reference to
> '__asan_report_store1'
> ../../gcc/libiberty/regex.c:4497: error: undefined reference to

You need

http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00810.html
http://gcc.gnu.org/ml/gcc-patches/2012-12/msg00809.html


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2012-12-20 19:25 ` hjl.tools at gmail dot com
@ 2012-12-20 19:55 ` Joost.VandeVondele at mat dot ethz.ch
  2012-12-20 19:59 ` hjl.tools at gmail dot com
                   ` (20 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-12-20 19:55 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #7 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-12-20 19:55:32 UTC ---
Thanks now bootstrap completes. 

It seems to me that libgfortran is not built with -fsanitize=address despite
--with-build-config=bootstrap-asan 

Is there a way to make that happen ?


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (7 preceding siblings ...)
  2012-12-20 19:55 ` Joost.VandeVondele at mat dot ethz.ch
@ 2012-12-20 19:59 ` hjl.tools at gmail dot com
  2012-12-20 20:05 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (19 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-20 19:59 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> 2012-12-20 19:58:44 UTC ---
(In reply to comment #7)
> Thanks now bootstrap completes. 
> 
> It seems to me that libgfortran is not built with -fsanitize=address despite
> --with-build-config=bootstrap-asan 
> 
> Is there a way to make that happen ?

bootstrap-asan is for bootstrapping GCC with -fsanitize=address.
It is orthogonal from compiling target run-time libraries with
-fsanitize=address.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (8 preceding siblings ...)
  2012-12-20 19:59 ` hjl.tools at gmail dot com
@ 2012-12-20 20:05 ` Joost.VandeVondele at mat dot ethz.ch
  2012-12-20 20:12 ` jakub at gcc dot gnu.org
                   ` (18 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-12-20 20:05 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #9 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-12-20 20:05:05 UTC ---
(In reply to comment #8)
> (In reply to comment #7)
> bootstrap-asan is for bootstrapping GCC with -fsanitize=address.
> It is orthogonal from compiling target run-time libraries with
> -fsanitize=address.

sorry for the novice question in that case, but do you happen to know how I get
a target run-time library compiled with -fsanitize=address ?


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (9 preceding siblings ...)
  2012-12-20 20:05 ` Joost.VandeVondele at mat dot ethz.ch
@ 2012-12-20 20:12 ` jakub at gcc dot gnu.org
  2012-12-20 20:43 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (17 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-20 20:12 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-20 20:11:55 UTC ---
cd obj*/x86_64*/libgfortran; make clean; \
make CFLAGS="-std=gnu99 -g -O2 -fsanitize=address " \
  FCFLAGS="-g -O2 -fsanitize=address" LDFLAGS="-B
`pwd`/../libsanitizer/asan/.libs/ -Wl,-rpath,`pwd`/../libsanitizer/asan/.libs/
-fsanitize=address"
?


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (10 preceding siblings ...)
  2012-12-20 20:12 ` jakub at gcc dot gnu.org
@ 2012-12-20 20:43 ` Joost.VandeVondele at mat dot ethz.ch
  2012-12-21  0:14 ` howarth at nitro dot med.uc.edu
                   ` (16 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2012-12-20 20:43 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #11 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2012-12-20 20:43:28 UTC ---
(In reply to comment #10)
> cd obj*/x86_64*/libgfortran; make clean; \
> make CFLAGS="-std=gnu99 -g -O2 -fsanitize=address " \
>   FCFLAGS="-g -O2 -fsanitize=address" LDFLAGS="-B
> `pwd`/../libsanitizer/asan/.libs/ -Wl,-rpath,`pwd`/../libsanitizer/asan/.libs/
> -fsanitize=address"
> ?
Thanks .. this ends with:

.libs/dprod_r8.o .libs/f2c_specifics.o   -Wl,-rpath
-Wl,/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libquadmath/.libs
-Wl,-rpath -Wl,/data/vjoost/gnu/gcc_trunk/install/lib/../lib64
../libquadmath/.libs/libquadmath.so -lm  -Wl,-rpath
-Wl,/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libgfortran/../libsanitizer/asan/.libs/
-Wl,-rpath
-Wl,/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libgfortran/../libsanitizer/asan/.libs/
-fsanitize=address -Wl,--version-script=../../../gcc/libgfortran/gfortran.map
-shared-libgcc   -Wl,-soname -Wl,libgfortran.so.3 -o .libs/libgfortran.so.3.0.0
/data/vjoost/gnu/binutils-2.22/install/bin/ld: error: cannot find -lasan
/data/vjoost/gnu/binutils-2.22/install/bin/ld: error: cannot find -lasan

despite:ls -tlr
/data/vjoost/gnu/gcc_trunk/obj/x86_64-unknown-linux-gnu/libgfortran/../libsanitizer/asan/.libs/
| grep libasan
-rwxrwxr-x. 1 vjoost vjoost  902120 Dec 20 20:32 libasan.so.0.0.0
lrwxrwxrwx. 1 vjoost vjoost      16 Dec 20 20:32 libasan.so.0 ->
libasan.so.0.0.0
lrwxrwxrwx. 1 vjoost vjoost      16 Dec 20 20:32 libasan.so -> libasan.so.0.0.0
-rw-rw-r--. 1 vjoost vjoost 1958634 Dec 20 20:32 libasan.a
-rw-rw-r--. 1 vjoost vjoost     984 Dec 20 20:32 libasan.lai
lrwxrwxrwx. 1 vjoost vjoost      13 Dec 20 20:32 libasan.la -> ../libasan.la


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (11 preceding siblings ...)
  2012-12-20 20:43 ` Joost.VandeVondele at mat dot ethz.ch
@ 2012-12-21  0:14 ` howarth at nitro dot med.uc.edu
  2013-01-22 10:34 ` jakub at gcc dot gnu.org
                   ` (15 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-12-21  0:14 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

Jack Howarth <howarth at nitro dot med.uc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #12 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-12-21 00:14:13 UTC ---
(In reply to comment #11)
You probably need -static-libasan -static-libstdc++ in front of
-fsanitize=address.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (12 preceding siblings ...)
  2012-12-21  0:14 ` howarth at nitro dot med.uc.edu
@ 2013-01-22 10:34 ` jakub at gcc dot gnu.org
  2013-01-22 10:53 ` jakub at gcc dot gnu.org
                   ` (14 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-22 10:34 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-22 10:33:53 UTC ---
The patch isn't sufficient.  For both -static-libasan -fsanitize=address
and just -fsanitize=address, we want -Bstatic -lasan -Bdynamic resp. -lasan
to go before all occurrences of the -lstdc++ or -lpthread or -lc, whether those
come from user command line options or language specific driver hacks or specs
expansion.  For dynamic -lasan it is obviously enough if it goes before the
first occurrence of -lstdc++, -lpthread or -lc, whatever is first, so in theory
we could just add it as the very first (or one of the first) ld/collect2
command line options.  libasan unfortunately crashes badly (without giving
useful messages) if e.g. -lpthread comes before -lasan.  And -lpthread can
either come from -pthread on the command line, or -lpthread, similarly -lstdc++
from just linking with g++, or from -lstdc++ on the command line. 
Unfortunately, -Wl,-Bstatic resp. -Wl,-Bdynamic might be passed directly on the
command line too, at random positions, so adding blindly -Bstatic -lasan
-Bdynamic isn't very good idea either, especially because those options aren't
counted, -Bstatic -Bstatic -lasan -Bdynamic will result in -Bdynamic after it.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (13 preceding siblings ...)
  2013-01-22 10:34 ` jakub at gcc dot gnu.org
@ 2013-01-22 10:53 ` jakub at gcc dot gnu.org
  2013-01-22 13:35 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-22 10:53 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-22 10:52:55 UTC ---
One way out of this would be for libasan.a to be an *.o object rather than *.a
archive:
mv libasan.a libasan_a.a
gcc -Wl,-r -nostdlib -o libasan.a -Wl,--whole-archive libasan_a.a
-Wl,--no-whole-archive
and then it could be linked early.  ASAN_STATIC_LIBS (-ldl -lpthread) for Linux
would obviously come late in the command line, where we currently emitted
-lasan too.
-lasan resp. -Bstatic -lasan -Bdynamic would need to go before %o in
LINK_COMMAND_SPEC in that case.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (14 preceding siblings ...)
  2013-01-22 10:53 ` jakub at gcc dot gnu.org
@ 2013-01-22 13:35 ` jakub at gcc dot gnu.org
  2013-01-29  8:54 ` david.abdurachmanov at gmail dot com
                   ` (12 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-22 13:35 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-22 13:35:28 UTC ---
Created attachment 29249
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29249
gcc48-pr55374.patch

Untested fix.  If -static-libasan is missing, it just moves -lasan early on ld
command line (before %o, i.e. user input arguments), as we error out on -static
and user -Bstatic would go after it, I think it is fine this way.  For
-static-libasan, we don't pass -lasan at all for -shared (we don't want many
(partial) copies of libasan.a in various shared libraries plus executable),
and just for executable link with -Bstatic --whole-archive -lasan
--no-whole-archive -Bdynamic early on the command line.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (15 preceding siblings ...)
  2013-01-22 13:35 ` jakub at gcc dot gnu.org
@ 2013-01-29  8:54 ` david.abdurachmanov at gmail dot com
  2013-01-29  9:11 ` kcc at gcc dot gnu.org
                   ` (11 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: david.abdurachmanov at gmail dot com @ 2013-01-29  8:54 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

David Abdurachmanov <david.abdurachmanov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david.abdurachmanov at
                   |                            |gmail dot com

--- Comment #16 from David Abdurachmanov <david.abdurachmanov at gmail dot com> 2013-01-29 08:54:14 UTC ---
Ping.

I noticed a patch ([PATCH] Put -lasan always very early on the ld command line
(PR sanitizer/55374)) posted on gcc-patches. There was not ACK yet from RM.

Any ideas if the patch manages to get into the trunk? It does seem quite
important for ASan usage.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (16 preceding siblings ...)
  2013-01-29  8:54 ` david.abdurachmanov at gmail dot com
@ 2013-01-29  9:11 ` kcc at gcc dot gnu.org
  2013-01-29  9:13 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: kcc at gcc dot gnu.org @ 2013-01-29  9:11 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #17 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-29 09:10:24 UTC ---
Note that there is at least one known bug in asan with -static-libstdc++
https://code.google.com/p/address-sanitizer/issues/detail?id=147


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (17 preceding siblings ...)
  2013-01-29  9:11 ` kcc at gcc dot gnu.org
@ 2013-01-29  9:13 ` jakub at gcc dot gnu.org
  2013-01-29  9:19 ` kcc at gcc dot gnu.org
                   ` (9 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-29  9:13 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-29 09:13:27 UTC ---
(In reply to comment #17)
> Note that there is at least one known bug in asan with -static-libstdc++
> https://code.google.com/p/address-sanitizer/issues/detail?id=147

As with the patch for this PR -lasan is linked before -lstdc++, the wrapper
should kick in.  But the patch is still unreviewed.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (18 preceding siblings ...)
  2013-01-29  9:13 ` jakub at gcc dot gnu.org
@ 2013-01-29  9:19 ` kcc at gcc dot gnu.org
  2013-01-29  9:30 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: kcc at gcc dot gnu.org @ 2013-01-29  9:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #19 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-29 09:18:49 UTC ---
> 
> As with the patch for this PR -lasan is linked before -lstdc++, the wrapper
> should kick in.  But the patch is still unreviewed.

How?
If we are linking both libraries statically, only one version of 
__cxa_throw will exist in the binary. 

The current code works like this (assuming dynamic linkage of stdc++): 
__cxa_throw in asan-rt calls __cxa_throw from libc++ (found using dlsym)

The same is true for various libc interceptors in asan,
that's why asan does not support fully static linkage.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (19 preceding siblings ...)
  2013-01-29  9:19 ` kcc at gcc dot gnu.org
@ 2013-01-29  9:30 ` jakub at gcc dot gnu.org
  2013-01-29  9:44 ` kcc at gcc dot gnu.org
                   ` (7 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-29  9:30 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-29 09:29:39 UTC ---
Ah, you're right.  My patch is mostly to fix -static-libasan or even
non-static-libasan - to make sure it comes early and thus override what it
thinks it actually overrides.  For -static or -static-libstdc++ to work, you'd
need --wrap=XXX ld options (and differently built libasan_static.a), but it'd
be a mess.  dlsym can't work in that case.
We error for -static -fsanitize=address, we could similarly error for
-static-libstdc++ -fsanitize=address combination.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (20 preceding siblings ...)
  2013-01-29  9:30 ` jakub at gcc dot gnu.org
@ 2013-01-29  9:44 ` kcc at gcc dot gnu.org
  2013-01-30 18:07 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: kcc at gcc dot gnu.org @ 2013-01-29  9:44 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #21 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-01-29 09:44:22 UTC ---
> we could similarly error for
> -static-libstdc++ -fsanitize=address combination.

Maybe.
Generally this works (in clang at least) and no one complained yet.
The bug https://code.google.com/p/address-sanitizer/issues/detail?id=147 
was found by code inspection when we were investigating a similar bug in tsan
(now fixed). It should be quite rare in the wild. 
Still, "maybe yes".


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (21 preceding siblings ...)
  2013-01-29  9:44 ` kcc at gcc dot gnu.org
@ 2013-01-30 18:07 ` jakub at gcc dot gnu.org
  2013-02-05  9:08 ` ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-30 18:07 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #22 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-30 18:06:09 UTC ---
Author: jakub
Date: Wed Jan 30 18:05:53 2013
New Revision: 195585

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195585
Log:
    PR sanitizer/55374
    * gcc.c (LIBASAN_SPEC): Define just to ADD_STATIC_LIBASAN_LIBS if
    LIBASAN_EARLY_SPEC is defined.
    (LIBASAN_EARLY_SPEC): Define to empty string if not already defined.
    (LINK_COMMAND_SPEC): Add LIBASAN_EARLY_SPEC for -fsanitize=address,
    before %o.
    * config/gnu-user.h (LIBASAN_EARLY_SPEC): Define.

    * g++.dg/asan/large-func-test-1.C: Allow both _Zna[jm] in addition
    to _Znw[jm] in the backtrace.  Allow _Zna[jm] to be the first frame
    printed in backtrace.
    * g++.dg/asan/deep-stack-uaf-1.C: Use malloc instead of operator new
    to avoid errors about mismatched allocation vs. deallocation.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/gnu-user.h
    trunk/gcc/gcc.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/asan/deep-stack-uaf-1.C
    trunk/gcc/testsuite/g++.dg/asan/large-func-test-1.C


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (22 preceding siblings ...)
  2013-01-30 18:07 ` jakub at gcc dot gnu.org
@ 2013-02-05  9:08 ` ebotcazou at gcc dot gnu.org
  2013-02-05 15:56 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2013-02-05  9:08 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #23 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2013-02-05 09:08:19 UTC ---
Author: ebotcazou
Date: Tue Feb  5 09:08:09 2013
New Revision: 195749

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195749
Log:
    PR sanitizer/55374
    * config/gnu-user.h (LIBASAN_EARLY_SPEC): Add missing guard.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/gnu-user.h


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (23 preceding siblings ...)
  2013-02-05  9:08 ` ebotcazou at gcc dot gnu.org
@ 2013-02-05 15:56 ` jakub at gcc dot gnu.org
  2013-03-22 14:48 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-05 15:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

--- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-05 15:55:41 UTC ---
Author: jakub
Date: Tue Feb  5 15:55:31 2013
New Revision: 195761

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195761
Log:
    PR sanitizer/55374
    * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Define.
    (STATIC_LIBTSAN_LIBS): Likewise.
    * gcc.c (ADD_STATIC_LIBTSAN_LIBS, LIBTSAN_EARLY_SPEC): Define.
    (LIBTSAN_SPEC): Add ADD_STATIC_LIBTSAN_LIBS, if LIBTSAN_EARLY_SPEC
    is defined, don't add anything else beyond that.
    (SANITIZER_EARLY_SPEC, SANITIZER_SPEC): Define.
    (LINK_COMMAND_SPEC): Use them.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/gnu-user.h
    trunk/gcc/gcc.c


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (24 preceding siblings ...)
  2013-02-05 15:56 ` jakub at gcc dot gnu.org
@ 2013-03-22 14:48 ` jakub at gcc dot gnu.org
  2013-05-31 11:00 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-03-22 14:48 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.0                       |4.8.1

--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-22 14:46:10 UTC ---
GCC 4.8.0 is being released, adjusting target milestone.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (25 preceding siblings ...)
  2013-03-22 14:48 ` jakub at gcc dot gnu.org
@ 2013-05-31 11:00 ` jakub at gcc dot gnu.org
  2013-10-16  9:50 ` jakub at gcc dot gnu.org
  2015-06-22 14:26 ` rguenth at gcc dot gnu.org
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-31 11:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.1                       |4.8.2

--- Comment #26 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.1 has been released.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (26 preceding siblings ...)
  2013-05-31 11:00 ` jakub at gcc dot gnu.org
@ 2013-10-16  9:50 ` jakub at gcc dot gnu.org
  2015-06-22 14:26 ` rguenth at gcc dot gnu.org
  28 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16  9:50 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.2                       |4.8.3

--- Comment #27 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work
  2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
                   ` (27 preceding siblings ...)
  2013-10-16  9:50 ` jakub at gcc dot gnu.org
@ 2015-06-22 14:26 ` rguenth at gcc dot gnu.org
  28 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-22 14:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55374

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.3                       |---


^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2015-06-22 14:26 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-18  1:10 [Bug other/55374] New: [asan] Can't link static libasan with static libstdc++ hjl.tools at gmail dot com
2012-11-18  1:18 ` [Bug other/55374] " hjl.tools at gmail dot com
2012-11-18  1:30 ` hjl.tools at gmail dot com
2012-12-08 17:06 ` [Bug sanitizer/55374] [asan] Wrong linking order of libasan and libstdc++ hjl.tools at gmail dot com
2012-12-08 17:09 ` [Bug sanitizer/55374] [asan] -static-libasan -static-libstdc++ doesn't work hjl.tools at gmail dot com
2012-12-08 17:11 ` hjl.tools at gmail dot com
2012-12-20 19:11 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-20 19:25 ` hjl.tools at gmail dot com
2012-12-20 19:55 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-20 19:59 ` hjl.tools at gmail dot com
2012-12-20 20:05 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-20 20:12 ` jakub at gcc dot gnu.org
2012-12-20 20:43 ` Joost.VandeVondele at mat dot ethz.ch
2012-12-21  0:14 ` howarth at nitro dot med.uc.edu
2013-01-22 10:34 ` jakub at gcc dot gnu.org
2013-01-22 10:53 ` jakub at gcc dot gnu.org
2013-01-22 13:35 ` jakub at gcc dot gnu.org
2013-01-29  8:54 ` david.abdurachmanov at gmail dot com
2013-01-29  9:11 ` kcc at gcc dot gnu.org
2013-01-29  9:13 ` jakub at gcc dot gnu.org
2013-01-29  9:19 ` kcc at gcc dot gnu.org
2013-01-29  9:30 ` jakub at gcc dot gnu.org
2013-01-29  9:44 ` kcc at gcc dot gnu.org
2013-01-30 18:07 ` jakub at gcc dot gnu.org
2013-02-05  9:08 ` ebotcazou at gcc dot gnu.org
2013-02-05 15:56 ` jakub at gcc dot gnu.org
2013-03-22 14:48 ` jakub at gcc dot gnu.org
2013-05-31 11:00 ` jakub at gcc dot gnu.org
2013-10-16  9:50 ` jakub at gcc dot gnu.org
2015-06-22 14:26 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).