Apologies if this issue is known I could not find anything related. I'm using clash on aarch64 nixos and I'm trying to upgrade to 9.6.4 or 9.8.1 from 9.0.2. But in both instances GHC balks when running clash with an assertion failure:
clash: internal error: ASSERTION FAILED: file rts/linker/elf_reloc_aarch64.c, line 99 (GHC version 9.8.1 for aarch64_unknown_linux) Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Steps to reproduce
It assumes you have nix installed(I don't have access to a non-nixos linux aarch64 system).
nix-shell -p haskell.compiler.ghc98 cabal-install
A similar assert is hit when going the full nix route. But instead of hitting the assert on line 99 it hits the one on line 76.
cabal run clash
Expected behavior
I expect it to run clash.
Environment
GHC version used: 9.8.1 and 9.6.4
Optional:
Operating System: NixOS unstable
System Architecture: Aarch64
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
@hsyl20 I'm afraid not. The addend here is already the computed address Page(S+A)-Page(P)).
The check at that point ensures that the advent fits in 33 bits, That's what we patch into the instruction, if the addend (=P(S+A)-P(P)) is too large, we can't encode it in the instruction as we don't have enough bits for the encoding left. We don't need the lower 12 bits, as we are page relative encoding, and this check is effectively ensuring we can stick the remaining 21bits from the computed final addend into the instruction. If it exceeds 33bits, we simply can't encode it.
I have this fixed in haskell.nix by using a different allocator. The issue is our current allocator. Our current allocator has multiple downsides to it:
it fragments too much.
it puts each section into its own page (this is very wasteful), ...
it makes tons of syscalls (mmap).
@rowanG you can try working around this by disabling split sections.
I tried to disable split sections with -fno-split-sections in cabal.project but it doesn't seem to do anything. I tried looking up the patch you mentioned in haskell.nix but I couldn't really identify which one it is. Could you link me to it?
I’ll try to confirm this works with your reproducer today. I’ve been working on a more polished patch that can be upstreamed, the one above lack some polish 🥶
@angerman I can confirm it works using haskell.nix. I tried manually copying over the patches you linked to a local nix environment but it did not fix the error. I guess I'm missing something. Since you are already working on it I will be patient. I really appreciate you picking this up.
@angerman I see that the pull request is merged. I tried again just applying these patches to my own local nix but it didn't work. I'm unfortunately not in the position at work to force usage of haskell.nix. Is there any way I can somehow clobber together a patchset which will work for me? I'm really blocked right now.
I've opened !12914 (closed) with a simpler fix (using the M32 allocator) than the one in haskell.nix (adding a new allocator). Not sure if it's enough to fix the issue though!
Could you retry with the added commit? It removes an arbitrary limitation (as we link PIC code) and it works for me on AArch64 with your reproducer:
> cabal run -w /home/hsyl20/ghc/_build/stage1/bin/ghc clashLoaded package environment from /home/hsyl20/ghc-aarch64-bug/.ghc.environment.aarch64-linux-9.6.5clash: no input filesUsage: For basic information, try the `--help' option.
Hmm I added the commits as a patch to a nixpkgs ghc 9.6.5 and I got a segmentation fault. So to dive a bit deeper I build GHC 9.6.5 locally with your commits included and ran the reproducer and indeed that works. I will test a few more things this week since I can't explain this difference... Perhaps @angerman knows more?
Backtrace:
Click to expand
(gdb) bt#0 0x0000fffff7c5c6b8 in __syscall_error () from /nix/store/27fg1mkiymj2b344j80kygsbxfcdl5qi-glibc-2.39-52/lib/libc.so.6#1 0x0000000004f66cdc in mprotectForLinker ()#2 0x0000000004f66158 in m32_allocator_flush ()#3 0x0000000004f3c95c in ocTryLoad ()#4 0x0000000004f3b50c in loadSymbol ()#5 0x0000000004f3b3d8 in lookupDependentSymbol ()#6 0x0000000004f673bc in fillGot ()#7 0x0000000004f638c8 in ocResolve_ELF ()#8 0x0000000004f3c888 in ocTryLoad ()#9 0x0000000004f3b50c in loadSymbol ()#10 0x0000000004f3b3d8 in lookupDependentSymbol ()#11 0x0000000004f673bc in fillGot ()#12 0x0000000004f638c8 in ocResolve_ELF ()#13 0x0000000004f3c888 in ocTryLoad ()#14 0x0000000004f3b50c in loadSymbol ()#15 0x0000000004f3b3d8 in lookupDependentSymbol ()#16 0x0000000004f673bc in fillGot ()#17 0x0000000004f638c8 in ocResolve_ELF ()#18 0x0000000004f3c888 in ocTryLoad ()#19 0x0000000004f3b50c in loadSymbol ()#20 0x0000000004f3b3d8 in lookupDependentSymbol ()#21 0x0000000004f3b7a0 in lookupSymbol ()#22 0x0000000004a28abc in ghcizm9zi6zi5_GHCiziObjLink_lookupClosure2_info ()Backtrace stopped: previous frame identical to this frame (corrupt stack?)
I have added nix files to the repo. See the nix/aarch64-reloc.patch for a patch containing your commits which is applied.
You can reproduce it in nix using nix-shell --run "cabal run clash". Unfortunately this will take ages since it has to recompile GHC + all dependendencies from scratch.
edit: Since GHC is rebuild anyways I have added debug flags to the nix build.
And then running the reproducer. It segfaults for me when building clash-prelude. The coredump shows it segfaults in the same location as the previous backtrace I posted:
Click to expand
Core was generated by `/home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/bin/ghc --make -f'.Program terminated with signal SIGSEGV, Segmentation fault.#0 0x0000fffedabf2e0c in mprotect () from /nix/store/0ckxcm0bnsh64a4vi40d5wjs96i014nl-glibc-2.37-8/lib/libc.so.6[Current thread is 1 (LWP 43749)](gdb) bt#0 0x0000fffedabf2e0c in mprotect () from /nix/store/0ckxcm0bnsh64a4vi40d5wjs96i014nl-glibc-2.37-8/lib/libc.so.6#1 0x00000000040ab69c in mprotectForLinker (start=0xfffe64ffc000, len=3592356352, mode=MEM_READ_EXECUTE) at rts/linker/MMap.c:435#2 0x00000000040aab50 in m32_allocator_flush (alloc=0xfffe62a4d2d0) at rts/linker/M32Alloc.c:452#3 0x0000000004076f44 in ocTryLoad (oc=0xfffe62a48f40) at rts/Linker.c:1727#4 0x0000000004075a0c in loadSymbol (lbl=0xfffe6517b62d "ghc_GHCziTypesziSrcLoc_zdtcRealSrcSpan_closure", pinfo=0xfffe62b466f0) at rts/Linker.c:1019#5 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe6517b62d "ghc_GHCziTypesziSrcLoc_zdtcRealSrcSpan_closure", dependent=0xfffe628c04f0, type=0x0) at rts/Linker.c:975#6 0x00000000040abd68 in fillGot (oc=0xfffe628c04f0) at rts/linker/elf_got.c:95#7 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe628c04f0) at rts/linker/Elf.c:1989#8 0x0000000004076e78 in ocTryLoad (oc=0xfffe628c04f0) at rts/Linker.c:1706#9 0x0000000004075a0c in loadSymbol (lbl=0xfffe999caee8 "ghc_GHCziTypesziSourceText_zdfDataSourceText_closure", pinfo=0xfffe62959d50) at rts/Linker.c:1019#10 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe999caee8 "ghc_GHCziTypesziSourceText_zdfDataSourceText_closure", dependent=0xfffe970eae20, type=0x0) at rts/Linker.c:975#11 0x00000000040abd68 in fillGot (oc=0xfffe970eae20) at rts/linker/elf_got.c:95#12 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe970eae20) at rts/linker/Elf.c:1989#13 0x0000000004076e78 in ocTryLoad (oc=0xfffe970eae20) at rts/Linker.c:1706#14 0x0000000004075a0c in loadSymbol (lbl=0xfffe936eb999 "ghc_GHCziCoreziDataCon_isUnboxedSumDataCon_closure", pinfo=0xfffe971ab420) at rts/Linker.c:1019#15 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe936eb999 "ghc_GHCziCoreziDataCon_isUnboxedSumDataCon_closure", dependent=0xfffe8d9b7320, type=0x0) at rts/Linker.c:975#16 0x00000000040abd68 in fillGot (oc=0xfffe8d9b7320) at rts/linker/elf_got.c:95#17 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe8d9b7320) at rts/linker/Elf.c:1989#18 0x0000000004076e78 in ocTryLoad (oc=0xfffe8d9b7320) at rts/Linker.c:1706#19 0x0000000004075a0c in loadSymbol (lbl=0xfffe64ee38b0 "ghc_GHCziCoreziTyCon_isClassTyCon_closure", pinfo=0xfffe8dae61a0) at rts/Linker.c:1019#20 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe64ee38b0 "ghc_GHCziCoreziTyCon_isClassTyCon_closure", dependent=0xfffe62cf14c0, type=0x0) at rts/Linker.c:975#21 0x00000000040abd68 in fillGot (oc=0xfffe62cf14c0) at rts/linker/elf_got.c:95#22 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe62cf14c0) at rts/linker/Elf.c:1989#23 0x0000000004076e78 in ocTryLoad (oc=0xfffe62cf14c0) at rts/Linker.c:1706#24 0x0000000004075a0c in loadSymbol (lbl=0xfffea0f85689 "ghc_GHCziTypesziTyThing_mkATyCon_closure", pinfo=0xfffe62d23c80) at rts/Linker.c:1019#25 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffea0f85689 "ghc_GHCziTypesziTyThing_mkATyCon_closure", dependent=0xfffe9de7c750, type=0x0) at rts/Linker.c:975#26 0x00000000040abd68 in fillGot (oc=0xfffe9de7c750) at rts/linker/elf_got.c:95#27 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe9de7c750) at rts/linker/Elf.c:1989#28 0x0000000004076e78 in ocTryLoad (oc=0xfffe9de7c750) at rts/Linker.c:1706#29 0x0000000004075a0c in loadSymbol (lbl=0xfffea11a6332 "ghc_GHCziBuiltinziTypesziPrim_alphaTyVar_closure", pinfo=0xfffe9df579e0) at rts/Linker.c:1019#30 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffea11a6332 "ghc_GHCziBuiltinziTypesziPrim_alphaTyVar_closure", dependent=0xfffe9db0baa0, type=0x0) at rts/Linker.c:975#31 0x00000000040abd68 in fillGot (oc=0xfffe9db0baa0) at rts/linker/elf_got.c:95#32 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe9db0baa0) at rts/linker/Elf.c:1989#33 0x0000000004076e78 in ocTryLoad (oc=0xfffe9db0baa0) at rts/Linker.c:1706#34 0x0000000004075a0c in loadSymbol (lbl=0xfffea2d3fbff "ghc_GHCziBuiltinziTypes_promotedTupleDataCon_closure", pinfo=0xfffe9dc7e150) at rts/Linker.c:1019#35 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffea2d3fbff "ghc_GHCziBuiltinziTypes_promotedTupleDataCon_closure", dependent=0xfffe9df86080, type=0x0) at rts/Linker.c:975--Type <RET> for more, q to quit, c to continue without paging--c#36 0x00000000040abd68 in fillGot (oc=0xfffe9df86080) at rts/linker/elf_got.c:95#37 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe9df86080) at rts/linker/Elf.c:1989#38 0x0000000004076e78 in ocTryLoad (oc=0xfffe9df86080) at rts/Linker.c:1706#39 0x0000000004075a0c in loadSymbol (lbl=0xfffe6549a26e "ghc_GHCziBuiltinziUniques_mkDataOccUnique_closure", pinfo=0xfffe9dfb9a10) at rts/Linker.c:1019#40 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe6549a26e "ghc_GHCziBuiltinziUniques_mkDataOccUnique_closure", dependent=0xfffe623cc050, type=0x0) at rts/Linker.c:975#41 0x00000000040abd68 in fillGot (oc=0xfffe623cc050) at rts/linker/elf_got.c:95#42 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe623cc050) at rts/linker/Elf.c:1989#43 0x0000000004076e78 in ocTryLoad (oc=0xfffe623cc050) at rts/Linker.c:1706#44 0x0000000004075a0c in loadSymbol (lbl=0xfffe5fe54255 "ghc_GHCziTypesziNameziOccurrence_zdtcOccName_closure", pinfo=0xfffe62447a30) at rts/Linker.c:1019#45 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe5fe54255 "ghc_GHCziTypesziNameziOccurrence_zdtcOccName_closure", dependent=0xfffe5859b810, type=0x0) at rts/Linker.c:975#46 0x00000000040abd68 in fillGot (oc=0xfffe5859b810) at rts/linker/elf_got.c:95#47 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe5859b810) at rts/linker/Elf.c:1989#48 0x0000000004076e78 in ocTryLoad (oc=0xfffe5859b810) at rts/Linker.c:1706#49 0x0000000004075a0c in loadSymbol (lbl=0xfffe64ec313b "ghc_GHCziUtilsziOutputable_text_info", pinfo=0xfffe586ebd70) at rts/Linker.c:1019#50 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe64ec313b "ghc_GHCziUtilsziOutputable_text_info", dependent=0xfffe62d369e0, type=0x0) at rts/Linker.c:975#51 0x00000000040abd68 in fillGot (oc=0xfffe62d369e0) at rts/linker/elf_got.c:95#52 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe62d369e0) at rts/linker/Elf.c:1989#53 0x0000000004076e78 in ocTryLoad (oc=0xfffe62d369e0) at rts/Linker.c:1706#54 0x0000000004075a0c in loadSymbol (lbl=0xfffe6447cd0b "ghc_GHCziTypesziUnique_getUnique_info", pinfo=0xfffe62d4fe00) at rts/Linker.c:1019#55 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe6447cd0b "ghc_GHCziTypesziUnique_getUnique_info", dependent=0xfffe63bf3a30, type=0x0) at rts/Linker.c:975#56 0x00000000040abd68 in fillGot (oc=0xfffe63bf3a30) at rts/linker/elf_got.c:95#57 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe63bf3a30) at rts/linker/Elf.c:1989#58 0x0000000004076e78 in ocTryLoad (oc=0xfffe63bf3a30) at rts/Linker.c:1706#59 0x0000000004075a0c in loadSymbol (lbl=0xfffe655b1c36 "ghc_GHCziUnitziTypes_zdfNFDataGenModule_closure", pinfo=0xfffe63cb07a0) at rts/Linker.c:1019#60 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe655b1c36 "ghc_GHCziUnitziTypes_zdfNFDataGenModule_closure", dependent=0xfffe622b46c0, type=0x0) at rts/Linker.c:975#61 0x00000000040abd68 in fillGot (oc=0xfffe622b46c0) at rts/linker/elf_got.c:95#62 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe622b46c0) at rts/linker/Elf.c:1989#63 0x0000000004076e78 in ocTryLoad (oc=0xfffe622b46c0) at rts/Linker.c:1706#64 0x0000000004075a0c in loadSymbol (lbl=0xfffe6431b68c "ghc_GHCziTypesziName_zdtcName_closure", pinfo=0xfffe62310bc0) at rts/Linker.c:1019#65 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe6431b68c "ghc_GHCziTypesziName_zdtcName_closure", dependent=0xfffe63e5fad0, type=0x0) at rts/Linker.c:975#66 0x00000000040abd68 in fillGot (oc=0xfffe63e5fad0) at rts/linker/elf_got.c:95#67 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe63e5fad0) at rts/linker/Elf.c:1989#68 0x0000000004076e78 in ocTryLoad (oc=0xfffe63e5fad0) at rts/Linker.c:1706#69 0x0000000004075a0c in loadSymbol (lbl=0xfffe64c43df4 "ghc_GHCziUtilsziBinary_putByte_closure", pinfo=0xfffe63ffa710) at rts/Linker.c:1019#70 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe64c43df4 "ghc_GHCziUtilsziBinary_putByte_closure", dependent=0xfffe630e3e70, type=0x0) at rts/Linker.c:975#71 0x00000000040abd68 in fillGot (oc=0xfffe630e3e70) at rts/linker/elf_got.c:95#72 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe630e3e70) at rts/linker/Elf.c:1989#73 0x0000000004076e78 in ocTryLoad (oc=0xfffe630e3e70) at rts/Linker.c:1706#74 0x0000000004075a0c in loadSymbol (lbl=0xfffe65878052 "ghc_GHCziTypesziVar_varName_closure", pinfo=0xfffe631ac7e0) at rts/Linker.c:1019#75 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe65878052 "ghc_GHCziTypesziVar_varName_closure", dependent=0xfffe61e35060, type=0x0) at rts/Linker.c:975#76 0x00000000040abd68 in fillGot (oc=0xfffe61e35060) at rts/linker/elf_got.c:95#77 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe61e35060) at rts/linker/Elf.c:1989#78 0x0000000004076e78 in ocTryLoad (oc=0xfffe61e35060) at rts/Linker.c:1706#79 0x0000000004075a0c in loadSymbol (lbl=0xfffe66fea43d "ghc_GHCziTypesziId_idName_closure", pinfo=0xfffe61e9a1a0) at rts/Linker.c:1019#80 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe66fea43d "ghc_GHCziTypesziId_idName_closure", dependent=0xfffe6b8e9780, type=0x0) at rts/Linker.c:975#81 0x00000000040abd68 in fillGot (oc=0xfffe6b8e9780) at rts/linker/elf_got.c:95#82 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe6b8e9780) at rts/linker/Elf.c:1989#83 0x0000000004076e78 in ocTryLoad (oc=0xfffe6b8e9780) at rts/Linker.c:1706#84 0x0000000004075a0c in loadSymbol (lbl=0xfffe5f23298c "ghc_GHCziTcziTypes_zdfFunctorTcPluginM_closure", pinfo=0xfffe6b9a76f0) at rts/Linker.c:1019#85 0x00000000040758e0 in lookupDependentSymbol (lbl=0xfffe5f23298c"ghc_GHCziTcziTypes_zdfFunctorTcPluginM_closure", dependent=0xfffe596efed0, type=0x0) at rts/Linker.c:975#86 0x00000000040abd68 in fillGot (oc=0xfffe596efed0) at rts/linker/elf_got.c:95#87 0x00000000040a8274 in ocResolve_ELF (oc=0xfffe596efed0) at rts/linker/Elf.c:1989#88 0x0000000004076e78 in ocTryLoad (oc=0xfffe596efed0) at rts/Linker.c:1706#89 0x0000000004075a0c in loadSymbol (lbl=0x42022c0478 "ghczmtypelitszmknownnatzm0zi7zi12zm1121e9ee23a33ec27a83f99ac095995fafc955a81a1a0dd7ba589a78bfbe97af_GHCziTypeLitsziKnownNatziSolver_plugin_closure", pinfo=0xfffe5970a830) at rts/Linker.c:1019#90 0x00000000040758e0 in lookupDependentSymbol ( lbl=0x42022c0478 "ghczmtypelitszmknownnatzm0zi7zi12zm1121e9ee23a33ec27a83f99ac095995fafc955a81a1a0dd7ba589a78bfbe97af_GHCziTypeLitsziKnownNatziSolver_plugin_closure", dependent=0x0, type=0x0) at rts/Linker.c:975#91 0x0000000004075cd8 in lookupSymbol (lbl=0x42022c0478 "ghczmtypelitszmknownnatzm0zi7zi12zm1121e9ee23a33ec27a83f99ac095995fafc955a81a1a0dd7ba589a78bfbe97af_GHCziTypeLitsziKnownNatziSolver_plugin_closure") at rts/Linker.c:1060
I made a small shell wrapper script that adds this option and directed cabal to use that as GHC. See the attached log file that results from compiling clash-prelude. I have compressed the log file. Since uncompressed it's 870mb. I assume most of it is not interesting but I don't want to truncate something that may be important. Since even with highest bz2 compressions it's still at 59mb I uploaded it here: https://file.io/U7V7M03A7Rmt
I think the relevant portion is just the end fragment:
Click to expand
ocTryLoad(/home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o): protecting mappingsmprotectForLinker: protecting 3460 bytes starting at 0xffff56efc000 as read-executemprotectForLinker: protecting 16384 bytes starting at 0xffff56ef8000 as read-executemprotectForLinker: protecting 16368 bytes starting at 0xffff56ef4000 as read-executemprotectForLinker: protecting 16381 bytes starting at 0xffff56ef0000 as read-executemprotectForLinker: protecting 16381 bytes starting at 0xffff56eec000 as read-executemprotectForLinker: protecting 16380 bytes starting at 0xffff56ee4000 as read-executeocTryLoad(/home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o): resolvedlookupSymbol: looking up 'ghc_GHCziDataziFastString_fsLit_closure'lookupSymbol: value of ghc_GHCziDataziFastString_fsLit_closure is 0xffff57336a40, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'stg_sel_0_upd_info'lookupSymbol: value of stg_sel_0_upd_info is 0x40e0ac8, owned by No owner, probably built-in.lookupSymbol: looking up 'stg_sel_1_upd_info'lookupSymbol: value of stg_sel_1_upd_info is 0x40e0b70, owned by No owner, probably built-in.lookupSymbol: looking up 'ghczmprim_GHCziTypes_EQ_closure'lookupSymbol: value of ghczmprim_GHCziTypes_EQ_closure is 0xffff8f297cf0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziDataziStrict_Just_con_info'lookupSymbol: value of ghc_GHCziDataziStrict_Just_con_info is 0xffff56efcd78, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o)lookupSymbol: looking up 'base_DataziData_mkConstrTag_closure'lookupSymbol: value of base_DataziData_mkConstrTag_closure is 0xffff9c476f58, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziData_mkDataType_closure'lookupSymbol: value of base_DataziData_mkDataType_closure is 0xffff9c476f50, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziData_Prefix_closure'lookupSymbol: value of base_DataziData_Prefix_closure is 0xffff9c47e3e0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'stg_ap_ppppp_fast'lookupSymbol: value of stg_ap_ppppp_fast is 0x40ef140, owned by No owner, probably built-in.lookupSymbol: looking up 'ghczmprim_GHCziTypes_TrNameS_con_info'lookupSymbol: value of ghczmprim_GHCziTypes_TrNameS_con_info is 0xffff8f222868, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziTypes_Module_con_info'lookupSymbol: value of ghczmprim_GHCziTypes_Module_con_info is 0xffff8f222840, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziTypes_KindRepTyConApp_con_info'lookupSymbol: value of ghczmprim_GHCziTypes_KindRepTyConApp_con_info is 0xffff8f2226b0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziDataziFastString_zdtcLexicalFastString_closure'lookupSymbol: value of ghc_GHCziDataziFastString_zdtcLexicalFastString_closure is 0xffff57334730, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'ghczmprim_GHCziTypes_zdtcInt_closure'lookupSymbol: value of ghczmprim_GHCziTypes_zdtcInt_closure is 0xffff8f297250, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziDataziFastString_zdtcFastString_closure'lookupSymbol: value of ghc_GHCziDataziFastString_zdtcFastString_closure is 0xffff57334830, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'ghczmprim_GHCziTypes_KindRepVar_con_info'lookupSymbol: value of ghczmprim_GHCziTypes_KindRepVar_con_info is 0xffff8f2226d8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziTypes_TyCon_con_info'lookupSymbol: value of ghczmprim_GHCziTypes_TyCon_con_info is 0xffff8f222688, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziTypes_krepzdzt_closure'lookupSymbol: value of ghczmprim_GHCziTypes_krepzdzt_closure is 0xffff8f296fb8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziTypes_KindRepFun_con_info'lookupSymbol: value of ghczmprim_GHCziTypes_KindRepFun_con_info is 0xffff8f222728, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziDataziStrict_zdtcMaybe_closure'lookupSymbol: value of ghc_GHCziDataziStrict_zdtcMaybe_closure is 0xffff56ee9000, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o)lookupSymbol: looking up 'base_DataziTypeableziInternal_mkTrCon_closure'lookupSymbol: value of base_DataziTypeableziInternal_mkTrCon_closure is 0xffff9c546b88, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghczmprim_GHCziClasses_zdfEqInt_closure'lookupSymbol: value of ghczmprim_GHCziClasses_zdfEqInt_closure is 0xffff8f23c730, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'base_DataziMaybe_fromJust_closure'lookupSymbol: value of base_DataziMaybe_fromJust_closure is 0xffff9c497308, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_zdp2MonadPlus_info'lookupSymbol: value of base_GHCziBase_zdp2MonadPlus_info is 0xffff8e523e00, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_mzzero_info'lookupSymbol: value of base_GHCziBase_mzzero_info is 0xffff8e523e98, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_return_info'lookupSymbol: value of base_GHCziBase_return_info is 0xffff8e524408, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_zgzgze_info'lookupSymbol: value of base_GHCziBase_zgzgze_info is 0xffff8e5242f8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_mplus_info'lookupSymbol: value of base_GHCziBase_mplus_info is 0xffff8e523f20, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_const_closure'lookupSymbol: value of base_GHCziBase_const_closure is 0xffff9c4c3f98, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziFunctorziConst_getConst_closure'lookupSymbol: value of base_DataziFunctorziConst_getConst_closure is 0xffff9c492b10, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_zd_closure'lookupSymbol: value of base_GHCziBase_zd_closure is 0xffff9c4c4610, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziFunctorziIdentity_runIdentity_closure'lookupSymbol: value of base_DataziFunctorziIdentity_runIdentity_closure is 0xffff9c4931a8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziData_CZCData_con_info'lookupSymbol: value of base_DataziData_CZCData_con_info is 0xffff8e35e290, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziData_Qi_con_info'lookupSymbol: value of base_DataziData_Qi_con_info is 0xffff8e35e4c0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghczmprim_GHCziTypes_krepzdztzmzgztzmzgzt_closure'lookupSymbol: value of ghczmprim_GHCziTypes_krepzdztzmzgztzmzgzt_closure is 0xffff8f2975b0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'base_DataziTypeableziInternal_mkTrApp_closure'lookupSymbol: value of base_DataziTypeableziInternal_mkTrApp_closure is 0xffff9c546cf8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziData_zdp1Data_info'lookupSymbol: value of base_DataziData_zdp1Data_info is 0xffff8e29b168, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziTypeable_gcast2_closure'lookupSymbol: value of base_DataziTypeable_gcast2_closure is 0xffff9c4a0dc8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_zdfSemigroupFUN_closure'lookupSymbol: value of base_GHCziBase_zdfSemigroupFUN_closure is 0xffff9c4c3e60, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziBase_zdfSemigroupOrdering_closure'lookupSymbol: value of base_GHCziBase_zdfSemigroupOrdering_closure is 0xffff9c4c4158, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghc_GHCziDataziStrict_zdfFunctorMaybe_closure'lookupSymbol: value of ghc_GHCziDataziStrict_zdfFunctorMaybe_closure is 0xffff56ee8548, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o)lookupSymbol: looking up 'ghc_GHCziPreludeziBasic_shiftR_closure'lookupSymbol: value of ghc_GHCziPreludeziBasic_shiftR_closure is 0xffff3e008020, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#419:Basic.o)lookupSymbol: looking up 'base_GHCziBits_zdfBitsInt_closure'lookupSymbol: value of base_GHCziBits_zdfBitsInt_closure is 0xffff9c4c63e0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghc_GHCziPreludeziBasic_shiftL_closure'lookupSymbol: value of ghc_GHCziPreludeziBasic_shiftL_closure is 0xffff3e008018, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#419:Basic.o)lookupSymbol: looking up 'base_GHCziNum_zm_info'lookupSymbol: value of base_GHCziNum_zm_info is 0xffff8e77def8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghc_GHCziDataziStrict_zdfApplicativeMaybe_closure'lookupSymbol: value of ghc_GHCziDataziStrict_zdfApplicativeMaybe_closure is 0xffff56ee8c98, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o)lookupSymbol: looking up 'stg_ap_ppp_info'lookupSymbol: value of stg_ap_ppp_info is 0x40e83f8, owned by No owner, probably built-in.lookupSymbol: looking up 'base_GHCziBase_liftA2_info'lookupSymbol: value of base_GHCziBase_liftA2_info is 0xffff8e524638, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghczmprim_GHCziClasses_zsze_info'lookupSymbol: value of ghczmprim_GHCziClasses_zsze_info is 0xffff8f1ccb68, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziDataziFastString_zdfEqLexicalFastString_closure'lookupSymbol: value of ghc_GHCziDataziFastString_zdfEqLexicalFastString_closure is 0xffff57334228, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'stg_sel_4_upd_info'lookupSymbol: value of stg_sel_4_upd_info is 0x40e0d68, owned by No owner, probably built-in.lookupSymbol: looking up 'stg_sel_2_upd_info'lookupSymbol: value of stg_sel_2_upd_info is 0x40e0c18, owned by No owner, probably built-in.lookupSymbol: looking up 'stg_sel_3_upd_info'lookupSymbol: value of stg_sel_3_upd_info is 0x40e0cc0, owned by No owner, probably built-in.lookupSymbol: looking up 'ghc_GHCziDataziFastString_zdfShowFastString_closure'lookupSymbol: value of ghc_GHCziDataziFastString_zdfShowFastString_closure is 0xffff57335118, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'base_GHCziBase_map_closure'lookupSymbol: value of base_GHCziBase_map_closure is 0xffff9c4c4058, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziOldList_intercalate_closure'lookupSymbol: value of base_DataziOldList_intercalate_closure is 0xffff9c541998, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_ControlziExceptionziBase_patError_closure'lookupSymbol: value of base_ControlziExceptionziBase_patError_closure is 0xffff9c46d518, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghc_GHCziDataziFastString_zdfEqFastString_closure'lookupSymbol: value of ghc_GHCziDataziFastString_zdfEqFastString_closure is 0xffff57336448, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'base_ControlziExceptionziBase_patError_info'lookupSymbol: value of base_ControlziExceptionziBase_patError_info is 0xffff8e24eee0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghc_GHCziDataziStrict_zdfEqMaybe_closure'lookupSymbol: value of ghc_GHCziDataziStrict_zdfEqMaybe_closure is 0xffff56ee8690, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o)lookupSymbol: looking up 'ghczmprim_GHCziClasses_zdfOrdInt_closure'lookupSymbol: value of ghczmprim_GHCziClasses_zdfOrdInt_closure is 0xffff8f261fa8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'base_GHCziShow_showString_closure'lookupSymbol: value of base_GHCziShow_showString_closure is 0xffff9c5122c0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziShow_showSpace_closure'lookupSymbol: value of base_GHCziShow_showSpace_closure is 0xffff9c5127a0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziShow_showParen_closure'lookupSymbol: value of base_GHCziShow_showParen_closure is 0xffff9c5122b0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziShow_showsPrec_info'lookupSymbol: value of base_GHCziShow_showsPrec_info is 0xffff8e805588, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghczmprim_GHCziClasses_zgze_info'lookupSymbol: value of ghczmprim_GHCziClasses_zgze_info is 0xffff8f1cc948, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziClasses_zlze_info'lookupSymbol: value of ghczmprim_GHCziClasses_zlze_info is 0xffff8f1cc838, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziClasses_zg_info'lookupSymbol: value of ghczmprim_GHCziClasses_zg_info is 0xffff8f1cc8c0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziClasses_max_info'lookupSymbol: value of ghczmprim_GHCziClasses_max_info is 0xffff8f1cc9d0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghczmprim_GHCziClasses_min_info'lookupSymbol: value of ghczmprim_GHCziClasses_min_info is 0xffff8f1cca58, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziUtilsziPanicziPlain_panic_closure'lookupSymbol: value of ghc_GHCziUtilsziPanicziPlain_panic_closure is 0xffff2823caa8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#694:Plain.o)lookupSymbol: looking up 'stg_gc_noregs'lookupSymbol: value of stg_gc_noregs is 0x40d7768, owned by No owner, probably built-in.lookupSymbol: looking up 'base_GHCziBase_CZCSemigroup_con_info'lookupSymbol: value of base_GHCziBase_CZCSemigroup_con_info is 0xffff8e53f270, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_DataziSemigroupziInternal_stimesDefault_closure'lookupSymbol: value of base_DataziSemigroupziInternal_stimesDefault_closure is 0xffff9c543dd8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'base_GHCziShow_showCommaSpace_closure'lookupSymbol: value of base_GHCziShow_showCommaSpace_closure is 0xffff9c512328, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghc_GHCziDataziStrict_zdfShowMaybe_closure'lookupSymbol: value of ghc_GHCziDataziStrict_zdfShowMaybe_closure is 0xffff56ee8628, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#233:Strict.o)lookupSymbol: looking up 'ghc_GHCziDataziFastString_zdfOrdLexicalFastString_closure'lookupSymbol: value of ghc_GHCziDataziFastString_zdfOrdLexicalFastString_closure is 0xffff573364c8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#213:FastString.o)lookupSymbol: looking up 'containerszm0zi6zi7_DataziMapziInternal_lookup_closure'lookupSymbol: value of containerszm0zi6zi7_DataziMapziInternal_lookup_closure is 0xffff9c0f91a0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/containers-0.6.7/HScontainers-0.6.7.olookupSymbol: looking up 'base_DataziFunction_on_closure'lookupSymbol: value of base_DataziFunction_on_closure is 0xffff9c48cdf8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.olookupSymbol: looking up 'ghczmprim_GHCziClasses_zdfOrdZLz2cUZR_closure'lookupSymbol: value of ghczmprim_GHCziClasses_zdfOrdZLz2cUZR_closure is 0xffff8f23d050, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-prim-0.10.0/HSghc-prim-0.10.0.olookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_braces_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_braces_closure is 0xffff28588e80, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_zdfIsLineSDoc_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_zdfIsLineSDoc_closure is 0xffff2858bb70, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_zdfIsDocSDoc_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_zdfIsDocSDoc_closure is 0xffff281f42c0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_zdzd_info'lookupSymbol: value of ghc_GHCziUtilsziOutputable_zdzd_info is 0xffff28584548, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_whenPprDebug_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_whenPprDebug_closure is 0xffff28588dc0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_zdfIsOutputSDoc_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_zdfIsOutputSDoc_closure is 0xffff28588948, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_ftext_info'lookupSymbol: value of ghc_GHCziUtilsziOutputable_ftext_info is 0xffff28584970, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_pprFastFilePath_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_pprFastFilePath_closure is 0xffff281f40b8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_colon_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_colon_closure is 0xffff28588eb0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_int_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_int_closure is 0xffff28588de8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_zlzg_info'lookupSymbol: value of ghc_GHCziUtilsziOutputable_zlzg_info is 0xffff28584aa0, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_hcat_info'lookupSymbol: value of ghc_GHCziUtilsziOutputable_hcat_info is 0xffff28584d00, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_ppWhen_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_ppWhen_closure is 0xffff28588f18, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_ppUnless_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_ppUnless_closure is 0xffff28588f20, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_comma_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_comma_closure is 0xffff28588ea8, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_parens_closure'lookupSymbol: value of ghc_GHCziUtilsziOutputable_parens_closure is 0xffff28588e78, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'stg_SRT_5_info'lookupSymbol: value of stg_SRT_5_info is 0x40dfd20, owned by No owner, probably built-in.lookupSymbol: looking up 'stg_CHARLIKE_closure'lookupSymbol: value of stg_CHARLIKE_closure is 0x4b8b970, owned by No owner, probably built-in.lookupSymbol: looking up 'ghc_GHCziUtilsziOutputable_char_info'lookupSymbol: value of ghc_GHCziUtilsziOutputable_char_info is 0xffff28584840, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#692:Outputable.o)lookupSymbol: looking up 'base_DataziOldList_sortBy_closure'lookupSymbol: value of base_DataziOldList_sortBy_closure is 0xffff9c542008, owned by /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/base-4.18.2.1/HSbase-4.18.2.1.oocTryLoad(/home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/lib/aarch64-linux-ghc-9.6.5/ghc-9.6.5/libHSghc-9.6.5.a(#632:SrcLoc.o): protecting mappingsmprotectForLinker: protecting 13276 bytes starting at 0xffff29488000 as read-executemprotectForLinker: protecting 3592356352 bytes starting at 0xffff29484000 as read-execute/home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/bin/ghc: line 2: 25050 Segmentation fault (core dumped) /home/rowan.goemans/Documents/engineering/ghc/_mybuild/stage1/bin/ghc-unwrapped +RTS -DL -RTS "$@"
I stared at the code a bit and added some debug prints where this absurd huge size comes from. It seems to me that it's memory corruption somewhere. See the patch below (Which includes your changes):
Patch
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.cindex bab2ca3041..4a0658ea00 100644--- a/rts/linker/Elf.c+++ b/rts/linker/Elf.c@@ -859,25 +859,23 @@ ocGetNames_ELF ( ObjectCode* oc ) unsigned nstubs = numberOfStubsForSection(oc, i); unsigned stub_space = STUB_SIZE * nstubs;+ unsigned full_size = size+stub_space;- void * mem = mmapAnonForLinker(size+stub_space);+ // use M32 allocator to avoid fragmentation and relocations impossible+ // to fulfil (cf #24432)+ bool executable = kind == SECTIONKIND_CODE_OR_RODATA;+ m32_allocator *allocator = executable ? oc->rx_m32 : oc->rw_m32;- if( mem == MAP_FAILED ) {- barf("failed to mmap allocated memory to load section %d. "- "errno = %d", i, errno);- }+ // Correctly align the section. This is particularly important for+ // the alignment of .rodata.cstNN sections.+ start = m32_alloc(allocator, full_size, align);+ if (start == NULL) barf("failed to alloc. fPIC: %d", (int)RtsFlags.MiscFlags.linkerAlwaysPic);+ alloc = SECTION_M32; /* copy only the image part over; we don't want to copy data * into the stub part. */- memcpy( mem, oc->image + offset, size );-- alloc = SECTION_MMAP;-- mapped_offset = 0;- mapped_size = roundUpToPage(size+stub_space);- start = mem;- mapped_start = mem;+ memcpy(start, oc->image + offset, size); #else if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) { // already mapped.@@ -914,7 +912,7 @@ ocGetNames_ELF ( ObjectCode* oc ) #if defined(NEED_PLT) oc->sections[i].info->nstubs = 0;- oc->sections[i].info->stub_offset = (uint8_t*)mem + size;+ oc->sections[i].info->stub_offset = (uint8_t*)start + size; oc->sections[i].info->stub_size = stub_space; oc->sections[i].info->stubs = NULL; #elsediff --git a/rts/linker/M32Alloc.c b/rts/linker/M32Alloc.cindex 6ad316e164..04d159b4be 100644--- a/rts/linker/M32Alloc.c+++ b/rts/linker/M32Alloc.c@@ -156,7 +156,10 @@ static bool is_okay_address(void *p) { int8_t *here = LINKER_LOAD_BASE; ssize_t displacement = (int8_t *) p - here;- return (displacement > -0x7fffffff) && (displacement < 0x7fffffff);+ // if we assume -fPIC, we don't care where we load code.+ // But we still want to use the m32 allocator to avoid fragmentation (#24432)+ return RtsFlags.MiscFlags.linkerAlwaysPic+ || ((displacement > -0x7fffffff) && (displacement < 0x7fffffff)); } enum m32_page_type {@@ -176,17 +179,18 @@ struct m32_page_t { // Pages (or large allocations) that have been filled and are in either the // unprotected_list or protected_list are linked together with this field. struct {- uint32_t size;+ size_t size2; struct m32_page_t *next; } filled_page; // Pages in the small-allocation nursery encode their current allocation // offset here.- size_t current_size;+ size_t current_size2; // Pages in the global free page pool are linked via this field. struct {- struct m32_page_t *next;+ size_t reserved;+ struct m32_page_t *next2; } free_page; }; #if defined(M32_DEBUG)@@ -195,6 +199,60 @@ struct m32_page_t { uint8_t contents[]; };+size_t get_size(struct m32_page_t *page);+size_t get_size(struct m32_page_t *page) {+ IF_DEBUG(linker_verbose, debugBelch(+ "get_size: page: %p, size: %zd, current_size: %zd\n",+ page, page->filled_page.size2, page->current_size2));++ return page->filled_page.size2;+}++size_t get_current_size(struct m32_page_t *page);+size_t get_current_size(struct m32_page_t *page) {+ IF_DEBUG(linker_verbose, debugBelch(+ "get_current_size: page: %p, size: %zd, current_size: %zd\n",+ page, page->filled_page.size2, page->current_size2));++ return page->current_size2;+}++void set_size(struct m32_page_t *page, size_t sz);+void set_size(struct m32_page_t *page, size_t sz) {+ IF_DEBUG(linker_verbose, debugBelch(+ "set_size: page: %p to %zd, size: %zd, current_size: %zd\n",+ page, sz, page->filled_page.size2, page->current_size2));++ page->filled_page.size2 = sz;+}++void set_current_size(struct m32_page_t *page, size_t sz);+void set_current_size(struct m32_page_t *page, size_t sz) {+ IF_DEBUG(linker_verbose, debugBelch(+ "set_current_size: page: %p to %zd, size: %zd, current_size: %zd\n",+ page, sz, page->filled_page.size2, page->current_size2));++ page->current_size2 = sz;+}++struct m32_page_t* get_free_next(struct m32_page_t *page);+struct m32_page_t* get_free_next(struct m32_page_t *page) {+ IF_DEBUG(linker_verbose, debugBelch(+ "get_free_next: page: %p, next: %p, size: %zd, current_size: %zd\n",+ page, page->free_page.next2, page->filled_page.size2, page->current_size2));++ return page->free_page.next2;+}++void set_free_next(struct m32_page_t *page, struct m32_page_t *next);+void set_free_next(struct m32_page_t *page, struct m32_page_t *next) {+ IF_DEBUG(linker_verbose, debugBelch(+ "set_free_next: page: %p next to %p, size: %zd, current_size: %zd\n",+ page, next, page->filled_page.size2, page->current_size2));++ page->free_page.next2 = next;+}+ /* Consistency-checking infrastructure */ #if defined(M32_DEBUG) static void ASSERT_PAGE_ALIGNED(void *page) {@@ -285,7 +343,7 @@ m32_release_page(struct m32_page_t *page) ASSERT_PAGE_NOT_FREE(page); const size_t pgsz = getPageSize();- ssize_t sz = page->filled_page.size;+ ssize_t sz = get_size(page); IF_DEBUG(sanity, memset(page, 0xaa, sz)); // Break the page, which may be a large multi-page allocation, into@@ -294,7 +352,7 @@ m32_release_page(struct m32_page_t *page) if (m32_free_page_pool_size < M32_MAX_FREE_PAGE_POOL_SIZE) { mprotectForLinker(page, pgsz, MEM_READ_WRITE); SET_PAGE_TYPE(page, FREE_PAGE);- page->free_page.next = m32_free_page_pool;+ set_free_next(page, m32_free_page_pool); m32_free_page_pool = page; m32_free_page_pool_size ++; } else {@@ -325,6 +383,7 @@ m32_alloc_page(void) const size_t pgsz = getPageSize(); const size_t map_sz = pgsz * M32_MAP_PAGES; uint8_t *chunk = mmapAnonForLinker(map_sz);+ memset(chunk, 0x00, map_sz); if (! is_okay_address(chunk + map_sz)) { reportMemoryMap(); barf("m32_alloc_page: failed to allocate pages within 4GB of program text (got %p)", chunk);@@ -335,17 +394,17 @@ m32_alloc_page(void) for (int i=0; i < M32_MAP_PAGES; i++) { struct m32_page_t *page = GET_PAGE(i); SET_PAGE_TYPE(page, FREE_PAGE);- page->free_page.next = GET_PAGE(i+1);+ set_free_next(page, GET_PAGE(i+1)); }- GET_PAGE(M32_MAP_PAGES-1)->free_page.next = m32_free_page_pool;+ set_free_next(GET_PAGE(M32_MAP_PAGES-1), m32_free_page_pool); m32_free_page_pool = (struct m32_page_t *) chunk; m32_free_page_pool_size += M32_MAP_PAGES; #undef GET_PAGE } struct m32_page_t *page = m32_free_page_pool;- m32_free_page_pool = page->free_page.next;+ m32_free_page_pool = get_free_next(page); m32_free_page_pool_size --; ASSERT_PAGE_TYPE(page, FREE_PAGE); return page;@@ -428,7 +487,7 @@ m32_allocator_flush(m32_allocator *alloc) { for (int i=0; i<M32_MAX_PAGES; i++) { if (alloc->pages[i] == NULL) { continue;- } else if (alloc->pages[i]->current_size == sizeof(struct m32_page_t)) {+ } else if (get_current_size(alloc->pages[i]) == sizeof(struct m32_page_t)) { // the page is empty, free it m32_release_page(alloc->pages[i]); } else {@@ -446,7 +505,7 @@ m32_allocator_flush(m32_allocator *alloc) { ASSERT_PAGE_TYPE(page, FILLED_PAGE); struct m32_page_t *next = m32_filled_page_get_next(page); m32_allocator_push_filled_list(&alloc->protected_list, page);- mprotectForLinker(page, page->filled_page.size, MEM_READ_EXECUTE);+ mprotectForLinker(page, get_size(page), MEM_READ_EXECUTE); page = next; } alloc->unprotected_list = NULL;@@ -496,8 +555,15 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) barf("m32_alloc: warning: Allocation of %zd bytes resulted in pages above 4GB (%p)", size, page); }+ SET_PAGE_TYPE(page, FILLED_PAGE);- page->filled_page.size = alsize + size;+ set_size(page, alsize + size);++ IF_DEBUG(linker_verbose, debugBelch(+ "m32_alloc: alsize %zd, size: %zd, sum: %zd, .size: %zd, .current_size: %zd at %p\n",+ alsize, size, alsize+size, get_size(page), get_current_size(page), (void*)page));++ m32_allocator_push_filled_list(&alloc->unprotected_list, (struct m32_page_t *) page); uint8_t *res = (uint8_t *) page + alsize; m32_report_allocation(alloc, res, size);@@ -519,17 +585,17 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) // page can contain the buffer? ASSERT_VALID_PAGE(alloc->pages[i]); ASSERT_PAGE_TYPE(alloc->pages[i], NURSERY_PAGE);- size_t alsize = ROUND_UP(alloc->pages[i]->current_size, alignment);+ size_t alsize = ROUND_UP(get_current_size(alloc->pages[i]), alignment); if (size <= pgsz - alsize) { void * addr = (char*)alloc->pages[i] + alsize;- alloc->pages[i]->current_size = alsize + size;+ set_current_size(alloc->pages[i], alsize + size); m32_report_allocation(alloc, addr, size); return addr; } // is this the most filled page we've seen so far? if (most_filled == -1- || alloc->pages[most_filled]->current_size < alloc->pages[i]->current_size)+ || get_current_size(alloc->pages[most_filled]) < get_current_size(alloc->pages[i])) { most_filled = i; }@@ -551,7 +617,7 @@ m32_alloc(struct m32_allocator_t *alloc, size_t size, size_t alignment) SET_PAGE_TYPE(page, NURSERY_PAGE); alloc->pages[empty] = page; // Add header size and padding- alloc->pages[empty]->current_size = size + ROUND_UP(sizeof(struct m32_page_t),alignment);+ set_current_size(alloc->pages[empty], size + ROUND_UP(sizeof(struct m32_page_t),alignment)); uint8_t *res = (uint8_t *) page + ROUND_UP(sizeof(struct m32_page_t), alignment); m32_report_allocation(alloc, res, size); return res;
It traces all accesses to the size and overlapping fields but in the resulting debug log I see this:
3592356352 is 0xd61f0000. It corresponds to the encoding of the br_x16 instruction that we use for the stubs (cf makeStubAarch64 in rts/linker/elf_plt_aarch64.c). So indeed it looks like memory corruption when we write the stubs of the previous section.
I don't understand how the stub addr field is defined in makeStub:
Why do we need the + 8? The last stub will be written out of bounds afaict. cc @angerman
@rowanG Could you try to remove this +8? This with some extra 4-byte padding at the end of the page could explain that we see this corrupt size value in the following page.
@hsyl20 Awesome. I can confirm I no longer see segfaults. But I do see "infinitely long"(It's been stuck on Language.Haskell.Exts.Syntax from haskell-src-exts for about an hour now) running compilation. But I don't see this in my patched nix GHC version.
I expect this is completely unrelated or has something to do with the way I build GHC. I will do some more experiments and get back to you whether I see anything weird.
@hsyl20 Can confirm that a non-minimized clash package also works without issues with the commits from !12914 (closed). For me I consider this to be solved. If I do see the infinitely long running compilation again I will make a separate issue for that.
@angerman, can you please open a merge request with this change? It makes me very nervous having haskell.nix diverge so regularly from GHC upstream as it makes it very hard to know which tickets are upstream issues and which are specific to haskell.nix.
I agree that this is not ideal. I am not very happy about the amount of patches we need in haskell.nix either. The dilemma is that I have patches usually against stable releases. Most of them are against 9.6(.4), and 8.10(.7). My understanding has mostly been that GHC HQ is not interested in patches against stable branches but only against HEAD. This has been the case with the aarch64-ncg in most recent memory. That however stands in stark conflict with what the needs at $work are. Which in retrospect meant we ended up not even having a proper patchset against 8.10, and were left without being able to use our improvements until today for production builds.
I am happy to work our patch for this issue into one against HEAD. I hope to have enough time to polish the patch next week. The one we have in haskell.nix is confirmed working.