summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-11-22 20:23:19 -0500
committerBen Gamari <ben@smart-cactus.org>2022-12-05 18:43:26 -0500
commit4f85f747b06a3be1591b52c1f15ff6588b8e5764 (patch)
tree87231500ae96a0b2a0b3c89232bb41ad902072d0
parent1ee07a55baba4c9cd1f268f5e9fdfe1b6b98bf00 (diff)
downloadhaskell-wip/tsan/codegen.tar.gz
rts: Ensure that global regs are never passed as fun call argswip/tsan/codegen
This is in general unsafe as they may be clobbered if they are mapped to caller-saved machine registers. See Note [Register parameter passing].
-rw-r--r--rts/HeapStackCheck.cmm6
1 files changed, 3 insertions, 3 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
index 49abbe934b..50b84a023c 100644
--- a/rts/HeapStackCheck.cmm
+++ b/rts/HeapStackCheck.cmm
@@ -569,7 +569,7 @@ stg_block_takemvar_finally
W_ r1, r3;
r1 = R1;
r3 = R3;
- unlockClosure(R3, stg_MVAR_DIRTY_info);
+ unlockClosure(r3, stg_MVAR_DIRTY_info);
R1 = r1;
R3 = r3;
jump StgReturn [R1];
@@ -597,7 +597,7 @@ stg_block_readmvar_finally
W_ r1, r3;
r1 = R1;
r3 = R3;
- unlockClosure(R3, stg_MVAR_DIRTY_info);
+ unlockClosure(r3, stg_MVAR_DIRTY_info);
R1 = r1;
R3 = r3;
jump StgReturn [R1];
@@ -625,7 +625,7 @@ stg_block_putmvar_finally
W_ r1, r3;
r1 = R1;
r3 = R3;
- unlockClosure(R3, stg_MVAR_DIRTY_info);
+ unlockClosure(r3, stg_MVAR_DIRTY_info);
R1 = r1;
R3 = r3;
jump StgReturn [R1];