summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2019-01-20 20:34:52 -0500
committerAndreas Klebinger <klebinger.andreas@gmx.at>2021-08-03 12:14:18 +0000
commit0a1db8a328a1553e23d7e62f3dc7e7b87658cc22 (patch)
treeb7848ab6912b9089bdd61896fe1c08b838dd474c
parent34e352173dd1fc3cd86c49380fda5a4eb5dd7aef (diff)
downloadhaskell-wip/D4759.tar.gz
rts: Make LOOKS_LIKE_INFO_PTR a bit more strictwip/D4759
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
-rw-r--r--includes/Cmm.h2
-rwxr-xr-x[-rw-r--r--]testsuite/tests/rts/flags/T20006.hs0
2 files changed, 1 insertions, 1 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 9b17e9f400..243910c7b1 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -590,7 +590,7 @@
/* 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) \
diff --git a/testsuite/tests/rts/flags/T20006.hs b/testsuite/tests/rts/flags/T20006.hs
index d82a4bd93b..d82a4bd93b 100644..100755
--- a/testsuite/tests/rts/flags/T20006.hs
+++ b/testsuite/tests/rts/flags/T20006.hs