summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-11 11:23:05 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-14 09:36:57 -0500
commit268a3ce952f6be00a1dd164dc4d7acb346045e90 (patch)
treeb7865c96792c6c3ee0be1d3318bd8ef6b474f0b0
parent294f907370fadd3313f8c5e6aa87a93c8b86f139 (diff)
downloadhaskell-268a3ce952f6be00a1dd164dc4d7acb346045e90.tar.gz
eventlog: Ensure that IPE output contains actual info table pointers
The refactoring in 866c736e introduced a rather subtle change in the semantics of the IPE eventlog output, changing the eventlog field from encoding info table pointers to "TNTC pointers" (which point to entry code when tables-next-to-code is enabled). Fix this. Fixes #22452.
-rw-r--r--rts/eventlog/EventLog.c2
-rw-r--r--rts/include/rts/IPE.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index 9b10666768..53d5e28a61 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -1429,7 +1429,7 @@ void postIPE(const InfoProvEnt *ipe)
ensureRoomForVariableEvent(&eventBuf, len);
postEventHeader(&eventBuf, EVENT_IPE);
postPayloadSize(&eventBuf, len);
- postWord64(&eventBuf, (StgWord) ipe->info);
+ postWord64(&eventBuf, (StgWord) INFO_PTR_TO_STRUCT(ipe->info));
postString(&eventBuf, ipe->prov.table_name);
postString(&eventBuf, ipe->prov.closure_desc);
postString(&eventBuf, ipe->prov.ty_desc);
diff --git a/rts/include/rts/IPE.h b/rts/include/rts/IPE.h
index 4d83629a58..f6d3607d1b 100644
--- a/rts/include/rts/IPE.h
+++ b/rts/include/rts/IPE.h
@@ -24,6 +24,8 @@ typedef struct InfoProv_ {
} InfoProv;
typedef struct InfoProvEnt_ {
+ // When TNTC is enabled this will point to the entry code
+ // not the info table itself.
const StgInfoTable *info;
InfoProv prov;
} InfoProvEnt;
@@ -50,6 +52,8 @@ typedef uint32_t StringIdx;
// The size of this must be a multiple of the word size
// to ensure correct packing.
typedef struct {
+ // When TNTC is enabled this will point to the entry code
+ // not the info table itself.
const StgInfoTable *info;
StringIdx table_name;
StringIdx closure_desc;