about summary refs log tree commit diff
path: root/alloc-inl.h
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-07-10 14:20:06 +0200
committerGitHub <noreply@github.com>2019-07-10 14:20:06 +0200
commit519678192ff47fe359abf3ef33938ae9dd3e52a2 (patch)
tree0bd97544280c245cecae06b843ddee54dc16ebaf /alloc-inl.h
parentc3083a77d411bb0e1e4ec8bd93594de92b9b4d38 (diff)
parent891ab3951befbf480a89f63702d111a62a054758 (diff)
downloadafl++-519678192ff47fe359abf3ef33938ae9dd3e52a2.tar.gz
Merge pull request #12 from vanhauser-thc/MOpt
Mopt
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); \