Cheng Shao pushed to branch wip/D4759 at Glasgow Haskell Compiler / GHC Commits: 90715f57 by Ben Gamari at 2025-11-29T03:13:27+01:00 rts: Make LOOKS_LIKE_INFO_PTR a bit more strict 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 - - - - - 1 changed file: - rts/include/rts/storage/ClosureMacros.h Changes: ===================================== rts/include/rts/storage/ClosureMacros.h ===================================== @@ -323,7 +323,7 @@ EXTERN_INLINE bool LOOKS_LIKE_INFO_PTR_NOT_NULL (StgWord p); EXTERN_INLINE bool LOOKS_LIKE_INFO_PTR_NOT_NULL (StgWord p) { StgInfoTable *info = INFO_PTR_TO_STRUCT((StgInfoTable *)p); - return info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES; + return info->type != INVALID_OBJECT && info->type < N_CLOSURE_TYPES && !HEAP_ALLOCED(p); } EXTERN_INLINE bool LOOKS_LIKE_INFO_PTR (StgWord p); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/90715f579c18e2e38854af52b971a05a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/90715f579c18e2e38854af52b971a05a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Cheng Shao (@TerrorJack)