Commit 058494f9 by Maxim Ostapenko Committed by Maxim Ostapenko

re PR sanitizer/78651 (Incorrect exception handling when catch clause uses local…

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
parent df1f4624
2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/78651
* dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
calling assemble_variable.
2018-03-19 Sudakshina Das <sudi.das@arm.com>
PR target/81647
......
......@@ -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;
......
2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/78651
* g++.dg/asan/pr78651.C: New test.
2018-03-19 Tom de Vries <tom@codesourcery.com>
* gcc.dg/tree-ssa/pr84512.c: Don't require effective target
......
// PR sanitizer/78651
// { dg-do run }
// { dg-additional-options "-fpic" { target fpic } }
struct A { };
namespace {
void thisThrows () {
throw A();
}
struct SomeRandomType {};
}
int main() {
try {
thisThrows();
}
catch (SomeRandomType) {
throw;
}
catch (A) {
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment