diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-21 16:17:58 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-21 16:17:58 +0000 |
commit | bcab70357277de1bbdcde3537b233ba5c0a86834 (patch) | |
tree | de1552f3c6535426ce4f9d195ddf9aedbc518693 /gcc | |
parent | 1575bb3ddb4ae6db206ce9b90051b8eb7785bf3c (diff) | |
download | gcc-bcab70357277de1bbdcde3537b233ba5c0a86834.tar.gz |
PR sanitizer/71953
* asan.c (asan_dynamic_init_call): Call asan_init_shadow_ptr_types
before builtin_decl_implicit.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238596 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/asan.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0757c89bf84..221a147bd9e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-07-21 Jakub Jelinek <jakub@redhat.com> + + PR sanitizer/71953 + * asan.c (asan_dynamic_init_call): Call asan_init_shadow_ptr_types + before builtin_decl_implicit. + 2016-07-21 James Greenhalgh <james.greenhalgh@arm.com> * optabs.c (emit_condiitonal_move): Short circuit for identical diff --git a/gcc/asan.c b/gcc/asan.c index 0900634f8ee..9047e1bfc8f 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -2159,6 +2159,9 @@ transform_statements (void) tree asan_dynamic_init_call (bool after_p) { + if (shadow_ptr_types[0] == NULL_TREE) + asan_init_shadow_ptr_types (); + tree fn = builtin_decl_implicit (after_p ? BUILT_IN_ASAN_AFTER_DYNAMIC_INIT : BUILT_IN_ASAN_BEFORE_DYNAMIC_INIT); @@ -2168,8 +2171,6 @@ asan_dynamic_init_call (bool after_p) pretty_printer module_name_pp; pp_string (&module_name_pp, main_input_filename); - if (shadow_ptr_types[0] == NULL_TREE) - asan_init_shadow_ptr_types (); module_name_cst = asan_pp_string (&module_name_pp); module_name_cst = fold_convert (const_ptr_type_node, module_name_cst); |