about summary refs log tree commit diff
path: root/alloc-inl.h
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-07-08 11:36:52 +0200
committervan Hauser <vh@thc.org>2019-07-08 11:36:52 +0200
commit198946231c389acaea10bf047f70264a27617b02 (patch)
tree564b790a7517ab1708734faa74f577c40ff9b55f /alloc-inl.h
parent0d6cddda4daa5f38029c34dc005b2e40a5898ea4 (diff)
downloadafl++-198946231c389acaea10bf047f70264a27617b02.tar.gz
imported MOpt and worked around the collisions with other patches
Diffstat (limited to 'alloc-inl.h')
-rw-r--r--alloc-inl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/alloc-inl.h b/alloc-inl.h
index d3c125fb..04f56d0d 100644
--- a/alloc-inl.h
+++ b/alloc-inl.h
@@ -83,10 +83,22 @@
           ABORT("Use after free."); \
         else ABORT("Corrupted head alloc canary."); \
       } \
+   } \
+  } while (0)
+
+/*
+#define CHECK_PTR(_p) do { \
+    if (_p) { \
+      if (ALLOC_C1(_p) ^ ALLOC_MAGIC_C1) {\
+        if (ALLOC_C1(_p) == ALLOC_MAGIC_F) \
+          ABORT("Use after free."); \
+        else ABORT("Corrupted head alloc canary."); \
+      } \
       if (ALLOC_C2(_p) ^ ALLOC_MAGIC_C2) \
         ABORT("Corrupted tail alloc canary."); \
     } \
   } while (0)
+*/
 
 #define CHECK_PTR_EXPR(_p) ({ \
     typeof (_p) _tmp = (_p); \