]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add support for ASan odr_indicator.
authorchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Dec 2016 07:39:27 +0000 (07:39 +0000)
committerchefmax <chefmax@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Dec 2016 07:39:27 +0000 (07:39 +0000)
commit47c3d0de2581b525485844a9274d2a5e403c310c
tree9fbdf0659d0c0d3375472bd8ec482b390381fa99
parentfc7572a0751d53445c2c3aea4156bd38bfe03fc4
Add support for ASan odr_indicator.

config/

        * bootstrap-asan.mk: Replace LSAN_OPTIONS=detect_leaks=0 with
        ASAN_OPTIONS=detect_leaks=0:use_odr_indicator=1.

gcc/

        * asan.c (asan_global_struct): Refactor.
        (create_odr_indicator): New function.
        (asan_needs_odr_indicator_p): Likewise.
        (is_odr_indicator): Likewise.
        (asan_add_global): Introduce odr_indicator_ptr. Pass it into global's
        constructor.
        (asan_protect_global): Do not protect odr indicators.

gcc/c-family/

* c-attribs.c (asan odr indicator): New attribute.
(handle_asan_odr_indicator_attribute): New function.

gcc/testsuite/

        * c-c++-common/asan/no-redundant-odr-indicators-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243153 138bc75d-0d04-0410-961f-82ee72b054a4
config/ChangeLog
config/bootstrap-asan.mk
gcc/ChangeLog
gcc/asan.c
gcc/c-family/ChangeLog
gcc/c-family/c-attribs.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/no-redundant-odr-indicators-1.c [new file with mode: 0644]