public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/55599] New: switch from mach_override to mac interpose function support in libasan broke -static-libasan
@ 2012-12-05  0:01 howarth at nitro dot med.uc.edu
  2012-12-05  0:07 ` [Bug sanitizer/55599] " howarth at nitro dot med.uc.edu
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-12-05  0:01 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55599
           Summary: switch from mach_override to mac interpose function
                    support in libasan broke -static-libasan
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: howarth@nitro.med.uc.edu
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


After r194120, the -static-libasan option fails to find the required symbols
for linking libasan.a on x86_64-apple-darwin12. For example...

% g++-fsf-4.8 -g -static-libasan -fsanitize=address cond1.C
Undefined symbols for architecture x86_64:
  "__interception::OverrideFunction(unsigned long, unsigned long, unsigned
long*)", referenced from:
      __asan::InitializeMacInterceptors()      in libasan.a(asan_mac.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

% nm libasan.0.dylib  | grep OverrideFunction
                 U __ZN14__interception16OverrideFunctionEmmPm

% nm libasan.a | grep OverrideFunction
                 U __ZN14__interception16OverrideFunctionEmmPm

Oddly when compiling normally against the dynamic library...

% g++-fsf-4.8 -g -fsanitize=address cond1.C
% nm ./a.out | grep OverrideFunction
% ./a.out
%

...the resulting executable links in libasan.0.dylib but doesn't complain about
the undefined symbol on execution.


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

end of thread, other threads:[~2012-12-08 19:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05  0:01 [Bug sanitizer/55599] New: switch from mach_override to mac interpose function support in libasan broke -static-libasan howarth at nitro dot med.uc.edu
2012-12-05  0:07 ` [Bug sanitizer/55599] " howarth at nitro dot med.uc.edu
2012-12-05  1:07 ` glider at google dot com
2012-12-05  3:47 ` howarth at nitro dot med.uc.edu
2012-12-05  4:01 ` kcc at gcc dot gnu.org
2012-12-05  4:51 ` glider at google dot com
2012-12-05  6:11 ` kcc at gcc dot gnu.org
2012-12-08 19:06 ` howarth at nitro dot med.uc.edu

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).