]> git.llucax.com Git - software/dgc/cdgc.git/commitdiff
Ensure getInfo() gets a valid base pointer
authorLeandro Lucarella <llucax@gmail.com>
Sat, 4 Sep 2010 01:04:46 +0000 (22:04 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Sat, 4 Sep 2010 01:04:46 +0000 (22:04 -0300)
rt/gc/cdgc/gc.d

index e53d5d13b20e35ccc2c6eb1fb7c989d03a1a44c0..a728af991550738f4b693f31c24a0f9c3a0bb109 100644 (file)
@@ -307,6 +307,8 @@ BlkInfo getInfo(void* p)
         return BlkInfo.init;
     BlkInfo info;
     info.base = pool.findBase(p);
+    if (info.base is null)
+        return BlkInfo.init;
     info.size = pool.findSize(info.base);
     info.attr = getAttr(pool, cast(size_t)(info.base - pool.baseAddr) / 16u);
     if (has_pointermap(info.attr)) {