diff options
author | kcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-23 17:59:53 +0000 |
---|---|---|
committer | kcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-23 17:59:53 +0000 |
commit | a9586c9cc10d268c2cd7642d03a75bb283b0e266 (patch) | |
tree | dfe8acd36f160811afc54c8eaf16e8160ba8bd70 /gcc/asan.c | |
parent | 4b9426aa0590d7761688e00e9da9393e228dd830 (diff) | |
download | gcc-a9586c9cc10d268c2cd7642d03a75bb283b0e266.tar.gz |
[libsanitizer merge from upstream r218156]
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215527 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/asan.c')
-rw-r--r-- | gcc/asan.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/asan.c b/gcc/asan.c index 2a90d863d07..6917950477d 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -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); } |