diff options
author | Maxim Ostapenko <m.ostapenko@samsung.com> | 2018-03-19 19:59:56 +0000 |
---|---|---|
committer | Maxim Ostapenko <chefmax@gcc.gnu.org> | 2018-03-19 21:59:56 +0200 |
commit | 058494f991ff11adee3458c6ac62fcbed28761df (patch) | |
tree | 4bf60eb65a2d5f824ce45e226928b42888e5bbc3 /gcc/dwarf2asm.c | |
parent | df1f46241d8f1869b492023c9f4e1389a12675c4 (diff) | |
download | gcc-058494f991ff11adee3458c6ac62fcbed28761df.zip gcc-058494f991ff11adee3458c6ac62fcbed28761df.tar.gz gcc-058494f991ff11adee3458c6ac62fcbed28761df.tar.bz2 |
re PR sanitizer/78651 (Incorrect exception handling when catch clause uses local class and PIC and sanitizer are active)
2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
gcc/
PR sanitizer/78651
* dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
calling assemble_variable.
gcc/testsuite/
PR sanitizer/78651
* g++.dg/asan/pr78651.C: New test.
From-SVN: r258658
Diffstat (limited to 'gcc/dwarf2asm.c')
-rw-r--r-- | gcc/dwarf2asm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c index e9b18b8..2e108ac 100644 --- a/gcc/dwarf2asm.c +++ b/gcc/dwarf2asm.c @@ -967,7 +967,13 @@ dw2_output_indirect_constant_1 (const char *sym, tree id) } sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym); + /* Disable ASan for decl because redzones cause ABI breakage between GCC and + libstdc++ for `.LDFCM*' variables. See PR 78651 for details. */ + unsigned int save_flag_sanitize = flag_sanitize; + flag_sanitize &= ~(SANITIZE_ADDRESS | SANITIZE_USER_ADDRESS + | SANITIZE_KERNEL_ADDRESS); assemble_variable (decl, 1, 1, 1); + flag_sanitize = save_flag_sanitize; assemble_integer (sym_ref, POINTER_SIZE_UNITS, POINTER_SIZE, 1); return 0; |