[Patch, AArch64] Enable Address sanitizer and UB sanitizer

Christophe Lyon christophe.lyon@linaro.org
Fri Sep 5 14:49:00 GMT 2014


Hi,

The attached patch enables the address and undefined behavior sanitizers.

I have tested it on AArch64 hardware, and asan.exp tests pass, but a
few ubsan.exp tests fail as follows:
FAIL: c-c++-common/ubsan/float-cast-overflow-1.c   -O3 -g  execution test
FAIL: c-c++-common/ubsan/float-cast-overflow-1.c   -O2 -flto
-flto-partition=none  execution test
FAIL: c-c++-common/ubsan/float-cast-overflow-2.c   -O3 -g  execution test
FAIL: c-c++-common/ubsan/float-cast-overflow-3.c   -O3 -g  execution test
FAIL: c-c++-common/ubsan/float-cast-overflow-4.c   -O2  execution test
FAIL: c-c++-common/ubsan/float-cast-overflow-4.c   -O3 -g  execution test
FAIL: c-c++-common/ubsan/overflow-int128.c   -O0  (internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O0  (test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O1  (internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O1  (test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O2  (internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O2  (test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O3 -fomit-frame-pointer
(internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O3 -fomit-frame-pointer
(test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O3 -g  (internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O3 -g  (test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -Os  (internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -Os  (test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O2 -flto
-flto-partition=none  (internal compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O2 -flto
-flto-partition=none  (test for excess errors)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O2 -flto  (internal
compiler error)
FAIL: c-c++-common/ubsan/overflow-int128.c   -O2 -flto  (test for excess errors)
FAIL: gcc.dg/ubsan/float-cast-overflow-bf.c   -O3 -g  execution test

I think all these failures need to be addressed separately, and should
not prevent from adding the functionality since most of them pass.

Note that an update of libsanitizer is required, to include at least
revision 209641 (which fixes internal_fork for AArch64).

OK for trunk?

Christophe.

2014-09-05  Christophe Lyon <christophe.lyon@linaro.org>
        gcc/
        * config/aarch64/aarch64-linux.h (ASAN_CC1_SPEC): Define.
        (CC1_SPEC): Define.
        * config/aarch64/aarch64.c (aarch64_asan_shadow_offset): New function.
        (TARGET_ASAN_SHADOW_OFFSET): Define.

        libsanitizer/
        * configure.tgt: Add AArch64 pattern.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: santizer-aarch64.patch
Type: text/x-patch
Size: 1755 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140905/0dd33678/attachment.bin>


More information about the Gcc-patches mailing list