[llvm-commits] [poolalloc] r134693 - /poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Fri Jul 8 00:55:01 PDT 2011
Author: aggarwa4
Date: Fri Jul 8 02:55:01 2011
New Revision: 134693
URL: http://llvm.org/viewvc/llvm-project?rev=134693&view=rev
Log:
Check that ptr is not null when initializing.
Modified:
poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp
Modified: poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp?rev=134693&r1=134692&r2=134693&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp Fri Jul 8 02:55:01 2011
@@ -27,7 +27,7 @@
* For now, run a version of the tool without the base fixed, and
* choose address.
*/
-#define BASE ((TypeTagTy *)(0x2aaaac01e000))
+#define BASE ((TypeTagTy *)(0x2aaaad01e000))
/*
* Do some macro magic to get mmap macros defined properly on all platforms.
*/
@@ -269,6 +269,8 @@
* 0xFF type indicates that any type can be read,
*/
void trackInitInst(void *ptr, uint64_t size, uint32_t tag) {
+ if(!ptr)
+ return;
uintptr_t p = maskAddress(ptr);
memset(&shadow_begin[p], 0xFF, size);
#if DEBUG
More information about the llvm-commits
mailing list