summaryrefslogtreecommitdiff
path: root/libsanitizer/asan/asan_globals.cc
diff options
context:
space:
mode:
authorkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-05 09:18:38 +0000
committerkcc <kcc@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-05 09:18:38 +0000
commit4fc7b5acfc1d42a0701c8fff726a3ebe7f563dd9 (patch)
tree20d85354103063e38b162a6a90b7ae51fb4b6104 /libsanitizer/asan/asan_globals.cc
parent50e6c257ee5ad435e3a736a1375ccc7639fd9244 (diff)
downloadgcc-4fc7b5acfc1d42a0701c8fff726a3ebe7f563dd9.tar.gz
libsanitizer merge from upstream r196090
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libsanitizer/asan/asan_globals.cc')
-rw-r--r--libsanitizer/asan/asan_globals.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/libsanitizer/asan/asan_globals.cc b/libsanitizer/asan/asan_globals.cc
index 96985af71a9..e97850a854a 100644
--- a/libsanitizer/asan/asan_globals.cc
+++ b/libsanitizer/asan/asan_globals.cc
@@ -92,15 +92,13 @@ static void RegisterGlobal(const Global *g) {
CHECK(AddrIsAlignedByGranularity(g->size_with_redzone));
if (flags()->poison_heap)
PoisonRedZones(*g);
- ListOfGlobals *l =
- (ListOfGlobals*)allocator_for_globals.Allocate(sizeof(ListOfGlobals));
+ ListOfGlobals *l = new(allocator_for_globals) ListOfGlobals;
l->g = g;
l->next = list_of_all_globals;
list_of_all_globals = l;
if (g->has_dynamic_init) {
if (dynamic_init_globals == 0) {
- void *mem = allocator_for_globals.Allocate(sizeof(VectorOfGlobals));
- dynamic_init_globals = new(mem)
+ dynamic_init_globals = new(allocator_for_globals)
VectorOfGlobals(kDynamicInitGlobalsInitialCapacity);
}
DynInitGlobal dyn_global = { *g, false };