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

--- Comment #21 from Maxim Ostapenko <m.ostapenko at samsung dot com> ---
(In reply to Tobias Burnus from comment #20)
> Created attachment 40574 [details]
> New still failing test case (tar.gz), slightly modifying the previous one
> 
> (In reply to chefmax from comment #19)
> > New Revision: 244890
> 
> I can confirm that the attached test case [attachment 40504 [details]] is
> fixed with that commit.
> 
> Unfortunately, for the big test case, it still fails with
> 
> AddressSanitizer: initialization-order-fiasco
> 
> New test case attached; the crucial difference (cf. xptimer.cc) seems to be
> that the code calls strdup() and, hence, allocates memory in the constructor.

Strange, new testcase (with strdup) doesn't fail for me:

/home/max/install/master/bin/g++ -g -O0 -flto -fsanitize=address xptimer.cc
xptiming.cc test.cc -static-libasan
ASAN_OPTIONS=check_initialization_order=true ./a.out
max@max:~/test-lto/test-2/test$ ASAN_OPTIONS=check_initialization_order=true
./a.out
max@max:~/test-lto/test-2/test$ echo $?
0

Reply via email to