ghc/0001-StgCmmPrim-Add-missing-write-barrier.patch

22 lines
927 B
Diff

From ca2e649101f250e444b4ac7c5204d28f236660e6 Mon Sep 17 00:00:00 2001
From: Peter Trommler <ptrommler@acm.org>
Date: Fri, 9 Sep 2016 10:55:58 +0200
Subject: [PATCH] StgCmmPrim: Add missing write barrier.
---
compiler/codeGen/StgCmmPrim.hs | 1 +
1 file changed, 1 insertion(+)
Index: ghc-8.0.1/compiler/codeGen/StgCmmPrim.hs
===================================================================
--- ghc-8.0.1.orig/compiler/codeGen/StgCmmPrim.hs
+++ ghc-8.0.1/compiler/codeGen/StgCmmPrim.hs
@@ -1353,6 +1353,7 @@ doWritePtrArrayOp addr idx val
emit (setInfo addr (CmmLit (CmmLabel mkMAP_DIRTY_infoLabel)))
-- the write barrier. We must write a byte into the mark table:
-- bits8[a + header_size + StgMutArrPtrs_size(a) + x >> N]
+ emitPrimCall [] MO_WriteBarrier []
emit $ mkStore (
cmmOffsetExpr dflags
(cmmOffsetExprW dflags (cmmOffsetB dflags addr (arrPtrsHdrSize dflags))