This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug sanitizer/55617] static constructors are not being instrumented correctly on darwin


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

Alexander Potapenko <glider at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glider at google dot com

--- Comment #5 from Alexander Potapenko <glider at google dot com> 2013-01-29 09:49:44 UTC ---
Here's a smaller repro for this problem:

$ cat cov.cc
struct c18 { 
  virtual void bar() { }
};
c18 ret;
int main () {
}
=====================================
$ inst/bin/g++ -fsanitize=address cov.cc -o cov -g
$ gdb cov
(gdb) r
Starting program: /Users/glider/src/gcc_failures/asan_g++_failures/cov
Reading symbols for shared libraries ++++............................. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000010002000021c
0x0000000100000dd2 in c18::c18 (this=0x1000010e0) at cov.cc:1
1 struct c18 {
(gdb) bt
#0  0x0000000100000dd2 in c18::c18 (this=0x1000010e0) at cov.cc:1
#1  0x0000000100000d5a in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535) at cov.cc:4
#2  0x0000000100000d6f in _GLOBAL__sub_I_cov.cc () at cov.cc:6
#3  0x00007fff5fc13378 in
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#4  0x00007fff5fc13762 in
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
()
#5  0x00007fff5fc1006e in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEjRNS_21InitializerTimingListE
()
#6  0x00007fff5fc0feba in
__dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextERNS_21InitializerTimingListE
()
#7  0x00007fff5fc01fc0 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#8  0x00007fff5fc05b04 in
__dyld__ZN4dyld5_mainEPK12macho_headermiPPKcS5_S5_Pm ()
#9  0x00007fff5fc01397 in
__dyld__ZN13dyldbootstrap5startEPK12macho_headeriPPKclS2_Pm ()
#10 0x00007fff5fc0105e in __dyld__dyld_start ()


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]