Skip to content

Commit 5a310b0

Browse files
authored
Workaround possible TH environment overflow running wine (#1517)
We still do not understand the cause, but wine seems to fail to start (we get a segfault) when building `cardano-wallet-cli` test `unit`. It seems to be an overflow somewhere in bash or very early in the `wine` startup code (since nothing is logged even with `WINEDEBUG=+all`). This changes `unsets` the large `pkgsHostTargetAsString` environment variable before wine is started (after that variable has been used). This seems to be enough to avoid the issue though it is worrying that it is not clear why.
1 parent 19e9e37 commit 5a310b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

overlays/mingw_w64.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ let
4444
ln -s "$l" "''${l#lib}"
4545
done
4646
)
47+
# Not sure why this `unset` helps. It might avoids some kind of overflow issue. We see `wine` fail to start when building `cardano-wallet-cli` test `unit`.
48+
unset pkgsHostTargetAsString
4749
WINEDLLOVERRIDES="winemac.drv=d" WINEDEBUG=warn-all,fixme-all,-menubuilder,-mscoree,-ole,-secur32,-winediag WINEPREFIX=$TMP ${wine}/bin/wine64 $REMOTE_ISERV/remote-iserv.exe tmp $PORT &
4850
(>&2 echo "---| remote-iserv should have started on $PORT")
4951
RISERV_PID="$!"

0 commit comments

Comments
 (0)