diff options
author | Kostya Serebryany <kcc@google.com> | 2014-09-23 17:59:53 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@gcc.gnu.org> | 2014-09-23 17:59:53 +0000 |
commit | 866e32ad336f1698809cc03c48f884379d6b39e0 (patch) | |
tree | dfe8acd36f160811afc54c8eaf16e8160ba8bd70 /gcc/asan.c | |
parent | e8ee40544aef309d4225852dda191bf0f986f761 (diff) | |
download | gcc-866e32ad336f1698809cc03c48f884379d6b39e0.zip gcc-866e32ad336f1698809cc03c48f884379d6b39e0.tar.gz gcc-866e32ad336f1698809cc03c48f884379d6b39e0.tar.bz2 |
[libsanitizer merge from upstream r218156]
From-SVN: r215527
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -230,6 +230,9 @@ along with GCC; see the file COPYING3. If not see // 1 if it has dynamic initialization, 0 otherwise. uptr __has_dynamic_init; + + // A pointer to struct that contains source location, could be NULL. + __asan_global_source_location *__location; } A destructor function that calls the runtime asan library function @@ -2136,19 +2139,20 @@ asan_dynamic_init_call (bool after_p) const void *__name; const void *__module_name; uptr __has_dynamic_init; + __asan_global_source_location *__location; } type. */ static tree asan_global_struct (void) { - static const char *field_names[6] + static const char *field_names[7] = { "__beg", "__size", "__size_with_redzone", - "__name", "__module_name", "__has_dynamic_init" }; - tree fields[6], ret; + "__name", "__module_name", "__has_dynamic_init", "__location"}; + tree fields[7], ret; int i; ret = make_node (RECORD_TYPE); - for (i = 0; i < 6; i++) + for (i = 0; i < 7; i++) { fields[i] = build_decl (UNKNOWN_LOCATION, FIELD_DECL, @@ -2220,6 +2224,8 @@ asan_add_global (tree decl, tree type, vec<constructor_elt, va_gc> *v) int has_dynamic_init = vnode ? vnode->dynamically_initialized : 0; CONSTRUCTOR_APPEND_ELT (vinner, NULL_TREE, build_int_cst (uptr, has_dynamic_init)); + CONSTRUCTOR_APPEND_ELT (vinner, NULL_TREE, + build_int_cst (uptr, 0)); init = build_constructor (type, vinner); CONSTRUCTOR_APPEND_ELT (v, NULL_TREE, init); } |