rts: Make LOOKS_LIKE_INFO_PTR a bit more strict wip/D4759
authorBen Gamari <bgamari.foss@gmail.com>
Mon, 21 Jan 2019 01:34:52 +0000 (20:34 -0500)
committerBen Gamari <ben@smart-cactus.org>
Mon, 21 Jan 2019 02:07:11 +0000 (21:07 -0500)
In particular, we now verify that the info table doesn't reside in the
dynamic heap.

Test Plan: Validate

Previously Differential Revision https://phabricator.haskell.org/D4759

includes/Cmm.h

index 7334eab..9ae2be8 100644 (file)
 
 /* Debugging macros */
 #define LOOKS_LIKE_INFO_PTR(p)                                  \
-   ((p) != NULL &&                                              \
+   (!HEAP_ALLOCED(p) &&                                         \
     LOOKS_LIKE_INFO_PTR_NOT_NULL(p))
 
 #define LOOKS_LIKE_INFO_PTR_NOT_NULL(p)                         \