public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/66524] New: Unable to detect InitializationOrderFiasco when compiled with "g++ -fsanitize=address"
@ 2015-06-12 15:37 bhupendra_thosare at persistent dot co.in
  2015-06-22 13:08 ` [Bug sanitizer/66524] " jakub at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: bhupendra_thosare at persistent dot co.in @ 2015-06-12 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66524
           Summary: Unable to detect InitializationOrderFiasco when
                    compiled with "g++ -fsanitize=address"
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bhupendra_thosare at persistent dot co.in
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

I am trying to run sample program provided in following link using g++ (4.8.2)
to report "initialization-order-fiasco" error.
https://code.google.com/p/address-sanitizer/wiki/InitializationOrderFiasco

However, if we are using g++ it do not report any error for following commands:
ASAN_OPTIONS=check_initialization_order=true ./a.out
export ASAN_OPTIONS=check_initialization_order=1; ./a.out
a.out // It will not work as AddressSanitizer can optionally detect dynamic
initialization order problems.

We are using following script to build and run the sample program:
==================================================================
# For gcc to print line numbers
export ASAN_OPTIONS=symbolize=1
export ASAN_SYMBOLIZER_PATH=/usr/bin/llvm-symbolizer
#export ASAN_OPTIONS=check_initialization_order=1 # NOT WORKING :-/

flags="-fno-omit-frame-pointer -fno-common"

echo "+++++++++++++++++++++++++++++++++++++++++"
echo "++++ Loose init-order checking"
echo "+++++++++++++++++++++++++++++++++++++++++"
rm -f a.out
g++ -fsanitize=address $flags -g a.cc b.cc

echo "**** ASAN_OPTIONS=check_initialization_order=true ./a.out ****"
ASAN_OPTIONS=check_initialization_order=true ./a.out
==================================================================

If we use "clang++" instead of "g++" in above script then it reports
"initialization-order-fiasco" error for same sample program.

Please let us know if I am missing any step OR
"ASAN_OPTIONS=check_initialization_order" is not supported for gcc 4.8.2.


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

* [Bug sanitizer/66524] Unable to detect InitializationOrderFiasco when compiled with "g++ -fsanitize=address"
  2015-06-12 15:37 [Bug sanitizer/66524] New: Unable to detect InitializationOrderFiasco when compiled with "g++ -fsanitize=address" bhupendra_thosare at persistent dot co.in
@ 2015-06-22 13:08 ` jakub at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-22 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
It is not going to work in 4.8.x, the support for this has only been added for
4.9.0 and later:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01791.html
In 4.9 you also don't have to play with llvm-symbolizer, symbolization happens
automatically using libbacktrace internally.


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 15:37 [Bug sanitizer/66524] New: Unable to detect InitializationOrderFiasco when compiled with "g++ -fsanitize=address" bhupendra_thosare at persistent dot co.in
2015-06-22 13:08 ` [Bug sanitizer/66524] " jakub 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).