Skip to content

Commit

Permalink
Added patch for scav bco
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Jun 10, 2024
1 parent 2ae65b7 commit a6161bb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NixSupport/mkGhcCompiler.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let
ihpDontHaddockPackages = [];
in ghcCompiler.override {
ghc = if pkgs.stdenv.isDarwin
then ghcCompiler.ghc.overrideAttrs (oldAttrs: { patches = [ ./ghc-12264.patch ] ++ (oldAttrs.patches or []); })
then ghcCompiler.ghc.overrideAttrs (oldAttrs: { patches = [ ./ghc-12264.patch ./scav-bco.patch ] ++ (oldAttrs.patches or []); })
else ghcCompiler.ghc;
overrides = composeExtensionsList [
generatedOverrides
Expand Down
27 changes: 27 additions & 0 deletions NixSupport/scav-bco.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
commit 1ed6e300d57a48129786ba2dfbda6da1e233a454 (HEAD -> wip/T23415-9.8)
Author: Ian-Woo Kim <ianwookim@gmail.com>
Date: Mon May 22 12:22:33 2023 -0700

Add missing BCO handling in scavenge_one.

(cherry picked from commit 902ebcc2b95707319d37a19d6b23c342cc14b162)

diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c
index 8debec6a666..9bbe069d875 100644
--- a/rts/sm/Scav.c
+++ b/rts/sm/Scav.c
@@ -1593,6 +1593,14 @@ scavenge_one(StgPtr p)
#endif
break;

+ case BCO: {
+ StgBCO *bco = (StgBCO *)p;
+ evacuate((StgClosure **)&bco->instrs);
+ evacuate((StgClosure **)&bco->literals);
+ evacuate((StgClosure **)&bco->ptrs);
+ break;
+ }
+
case COMPACT_NFDATA:
scavenge_compact((StgCompactNFData*)p);
break;

0 comments on commit a6161bb

Please sign in to comment.