Alan Zimmerman pushed to branch wip/az/epa-tidy-locatedxxx-36 at Glasgow Haskell Compiler / GHC Commits: d72505e4 by Simon Jakobi at 2026-11-12T15:26:14-05:00 testsuite: Fix T17088 flakiness and restore bug coverage T17088 reads and prints a byte from an uninitialized array. Debug RTS ways fill allocated memory with 0xaa, so the test can fail due to an output mismatch unrelated to the pointer-tagging bug it covers. Initialize the byte to zero to make the output deterministic. The original bug requires the compacting collector and particular compiler and RTS settings. Run the test only in the compacting_gc way with -O1 and -A128k. Also disable STG lambda lifting because it removes the closure shape needed to reproduce the pointer-tagging failure. This makes the test reliable while ensuring it remains an effective reproducer for #17088. Closes #27534. Assisted-by: gpt-5.6-sol via Codex CLI - - - - - 5a7591b3 by David Eichmann at 2026-11-12T15:26:56-05:00 testsuite: Fix python type errors These errors appear when using the VSCode python extension which uses Pylance under the hood. - - - - - 52f129f8 by David Eichmann at 2026-11-12T15:26:56-05:00 Add test modifier to test over all IO Managers - - - - - 22e8b92a by David Eichmann at 2026-11-12T15:26:56-05:00 testsuite: include custom IO Manager in test name - - - - - 82c34ccd by Simon Jakobi at 2026-11-12T15:27:40-05:00 Make T2464 actually test #ifdef'd pragmas The test guarded a LANGUAGE EmptyDataDecls pragma behind #if, but EmptyDataDecls is on by default since Haskell2010, so the module compiled even when the guarded pragma was ignored. Guard MagicHash instead, which is unlikely to be included in a future default language. The test also checks that warnings from file-header pragmas are emitted only once, even though the pragmas are parsed both before and after CPP, using the -fffi deprecation warning as the canary. Use an unrecognised warning flag instead, so the test no longer depends on a deprecated flag that is about to be removed. Context: #27939 Assisted-by: Claude Fable 5.1 - - - - - 419f2a12 by Simon Jakobi at 2026-11-12T15:27:40-05:00 Remove command-line flags deprecated in GHC 8.2 or earlier Also remove the INCLUDE file-header pragma, which only expanded to the now-removed -#include. Closes #27939. Assisted-by: Claude Fable 5.1 - - - - - adc294d0 by Erik de Castro Lopo at 2026-11-12T15:28:21-05:00 TimerManager: publish only evaluated timeout queues (#9809) The issue in #9809 was triggered by many threads registering timeouts at the same time and those timeouts being stored as unevaluated thunks in the shared list. When say 100,000 timeouts are registered at the same time, the program can be slowed down considerably and the memory usage grow unacceptably large. The commit that caused the problem was 2d5eccdf1c, a 2013 change that fixed #7653. The fix is to add a modifyTimeouts function which applies an edit to a copy of the list and fully evaluates the result before replacing the shared list with a CAS operation. Performance has improved for the threaded case and not regressed for the single thread case: Forked registrations of 100k timeouts (median of 5 runs): -N4: 0.577 s, 428 MB -> 0.078 s, 39 MB -N12: 1.227 s, 479 MB -> 0.127 s, 80 MB Forked registrations of 1M timeouts on -N1 (median of 3 and 10 runs): 5.21 s (range 0.67-9.47 s), 1613 MB -> 0.67 s, 250 MB Single-thread registrations are unchanged or slightly faster, and timer latency during registration storms improves (p99 lateness of a 1 ms threadDelay during 100k forked registrations on -N4: 302-394 ms -> 3.5-4.1 ms). The registration code still runs in constant stack, so #7653 stays fixed; T7653 and the concurrent, base and ghc-internal testsuites pass. modifyTimeouts is OPAQUE so that the optimiser cannot expose the edit function's inspection of the old queue next to the compare-and-swap and replace the expected pointer with the evaluated queue, which would make the compare-and-swap keep failing when the MutVar# holds a thunk or indirection. Regression test T9809.hs included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - b294b82f by Moritz Angermann at 2026-11-12T15:28:21-05:00 testsuite: give pause_resume_via_safe_ffi_concurrent 60s on Darwin CI The 10s System.Timeout watchdog was a false deadlock: five serialized 1s pauses plus rts_pause waiting on threadDelay/timer-manager traffic overruns that budget on loaded Mac runners. Keep a watchdog so a real hang still fails. - - - - - 1543f834 by Simon Jakobi at 2026-11-12T15:29:03-05:00 testsuite/README: Don't append new tests at the end of all.T Patches that each add a test at the end of the same all.T conflict with each other. Tests added elsewhere in the file usually merge cleanly. Context: #26285 Assisted-by: Claude Opus 5.5 - - - - - 9ad25cb2 by Sven Tennie at 2026-11-14T06:20:13-05:00 hadrian: Add Stage3 cross-compiled target bindist (#26924) Add a `binary-dist-stage3` Hadrian target that packages target executables (produced by the stage2 compiler) into a separate '_build/bindist-stage3/' folder, distinct from the stage2 regular or cross-compiler bindist in '_build/bindist/'. This allows a single CI pipeline job to produce both a cross-compiler bindist (e.g. x86_64 -> RISC-V) and a target-architecture bindist (e.g. RISC-V -> RISC-V) that can be installed and run natively on the target. To avoid issues with stale files or race-conditions on them, generate the `configure` script per stage in `_build/<stage>/distrib` directories. - - - - - ca91017d by Sven Tennie at 2026-11-14T06:20:13-05:00 ci: Build Stage3 and Stage2 bindists for cross targets in one job (#26924) Building the stage3 target bindist already produces most of the stage2 cross-compiler bindist as a byproduct, so building them in separate jobs duplicates the build efforts for no benefit. Instead of a separate CROSS_STAGE=3 job, the stage3 job now also builds and publishes the stage2 bindist. The stage3 tarball is named and versioned as if it were built natively on the target (target triple prefix, non-cross opsys), so its artifact name stays what downstream consumers already expect and no changes are needed on their side. For now, this is only enabled for the RISC-V job. Others can easily follow. - - - - - 71b41e09 by Sven Tennie at 2026-11-14T06:20:14-05:00 ci: model cross targets as structured TargetPlatform triples (#26924) Storing the cross target as a raw triple forced ad-hoc parsing at every use, and broke the single responsibility rule. Modelling it as a structured `TargetPlatform`` instead, avoids parsing and provides a clear separation of concerns. - - - - - 8067c2f9 by Sven Tennie at 2026-11-14T06:20:14-05:00 ci: extract the cross smoke tests into a separate smoke_test command (#26924) This reduces if-nesting and complexity of the main `test_hadrian` command. The decision how to test is now made by the caller. This is a fair choice, because most test cases can run under emulation - they are just very slow then. The Stage3 smoke test also checks that the target compiler does not report itself as cross-compiling and, when supported, runs a small GHCi expression. - - - - - 7ece99a7 by fendor at 2026-11-14T06:20:57-05:00 Add `-dep-json` flag to `ghc -M` Add an optional flag to `ghc -M` that allows to write the dependency information in JSON Lines format. The JSON Lines format enables us to stream the output of the dependency generation to a consumer. The output of `-dep-json` is streamed to a temporary file and then copied to the final destination to avoid partial writes. Each line contains one of two possible json objects: 1. A Home Unit Dependency * Contains the name of the home module, its unit, where it is located, whether a preprocessor is used, and all of its imports. Importantly, the imports include `-XExplicitLevelImports` information. * If requested via `-include-pkg-deps`, includes imports of external units, e.g. modules from `base`. * If requested via `-include-cpp-deps`, files included via CPP. 2. External Unit Dependency * Only if `-include-pkg-deps` is given * Contains unit-id, its package name and package id. --- This PR refactors the Makefile generation to use phases appropriately. We introduce an intermediate data structure that is generated based on the module graph nodes, and only then generate the Makefile rules. This allows the dep-json and dep-makefile generation to use the same dependency processing. - - - - - 0f6e0146 by fendor at 2026-11-14T06:20:57-05:00 Add multiple home unit support to `ghc -M` Allows to process the module graph of multiple home units at once using the same syntax as `--make` and `--interactive`: ghc -M -unit @unitA -unit @unitB The semantics are identical to `--make` and `--interactive`. Each home unit can declare individually to use `-include-cpp-deps` and `-include-pkg-deps`. However, there can only be one output file, and `-dep-json` and `-dep-makefile` can only be provided at the top of the cli invocation. We introduce a new GHC API `doMkDepend` that allows to use multiple home units conveniently. The output of `-dep-json` and `-dep-makefile` does not change, since we were careful to choose a format that supports multiple home units from the start. Single home units are still accepted like before with no changes. - - - - - 5598e6a0 by fendor at 2026-11-14T06:20:57-05:00 Deprecate `doMkDependHS` in favour of `doMkDepend` - - - - - 39f2943e by David Eichmann at 2026-11-14T06:21:41-05:00 rts: Expose getRtsSymbols() and store redirect labels and external symbols tag - - - - - aa159605 by David Eichmann at 2026-11-14T06:21:41-05:00 hadrian: when running tests, properly set have_gdb and have_readelf - - - - - ff826da4 by David Eichmann at 2026-11-14T06:21:41-05:00 testsuite: add have_ldd() test modifier - - - - - b9f0b7e2 by David Eichmann at 2026-11-14T06:21:41-05:00 testsuite driver: on windows, ensure PATH correctly contains mingw and ghc-pkg libraries - - - - - 543c108e by David Eichmann at 2026-11-14T06:21:41-05:00 testsuite: driver now sets WAY_FLAGS variable for makefile tests - - - - - 13408a2b by David Eichmann at 2026-11-14T06:21:41-05:00 Add golden test for rts/RtsSymbols.c This test compares declared symbols against symbols observed in the rts DSO (.so file). - - - - - 38d421fb by Sylvain Henry at 2026-11-16T16:02:22-05:00 CoreMap: look up a non-recursive let with the key order of the store xtE stored a `Let (NonRec b r) e` with the body e as the first key and the right-hand side r as the second key. lkE used the opposite order. When a trie level holds one entry, GenMap compares the full keys with (==), and the difference has no effect. When a trie level holds two entries, a lookup of an expression with a non-recursive let fails. A later insert of an equal expression then overwrites the first entry. Now xtE stores the key in the order that lkE uses. Effects of the bug: CSE did not share identical bindings when a module had two different bindings that hold a non-recursive let or join point (#27892). The pattern-match checker gave different representatives to equal guard or view expressions, and thus reported spurious non-exhaustive matches. Fixes #27892. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - fa5bc4c0 by Sylvain Henry at 2026-11-16T16:02:22-05:00 CoreMap: ignore the multiplicities of binders BndrMap keyed a binder on its type and on its multiplicity, and eqDeBruijnExpr compared the multiplicities of lambda binders. But the multiplicity of a let binder has no meaning (Note [Multiplicity of let binders] in GHC.Types.Var), and Core-to-core passes do not keep the multiplicities of lambda binders correct (Note [Linting linearity] in GHC.Core.Lint). Thus the trie separated terms that are equal. The key-order bug fixed in the previous commit hid this bug. With that fix, the pattern-match checker gave different representatives to two equal view expressions when one let came from the source and the other let came from the beta-reduction of a linear lambda. Now BndrMap is TypeMapG again, as before the linear types commit, and eqDeBruijnExpr ignores the multiplicities of lambda binders. The haddocks of CoreMap and eqCoreExpr state this contract. Fixes #28095. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> - - - - - fa6b8c9e by Simon Peyton Jones at 2026-11-16T16:03:04-05:00 Swap visibilities in mkSymCo As #28123 showed, `mkSymCo` was failing to swap visibility flags in `ForAllCo`. Fixing that in turn showed that the change to `mkEtaForAllMCo` that allegedly fixed #27557 was utterly wrong, and should simply be un-done. I have added some comments to document the invariants. - - - - - cbe0a6bf by fendor at 2026-11-17T09:25:55-05:00 Add support for streaming `ghc -M` to stdout Adds the flags `-dep-json-stdout` and `-dep-makefile-stdout` which streams dependency information line-by-line to stdout. Each dependency generation can be redirected to separate outputs. Providing any extra `-dep-{json,makefile}[-stdout]` disables the default generation of the `Makefile` file. Allows consumers to start processing the dependency information as it comes in and not waiting for the dependency generation to finish. `DepStream` abstracts over the possible output handles, which is either a file or the stdout handle. Writing to a file requires temporary file paths, thus `DepStream` must provide a way to perform clean up when dependency processing finished or when an error is thrown for any reason. We further decouple the rendering and writing of the result from the dependency generation, localising side effects and making the code slightly more readable. The testsuite now also handles `ghc -M` writing to stdout. We add a test for each combination of writing to stdout and file, except for writing both makefile and json. While it probably works, is really undefined behaviour. Closes #27937 - - - - - fbd49db2 by Sylvain Henry at 2026-11-17T09:27:09-05:00 Link the on-demand iserv without --gc-sections GHC links an iserv program each time a session needs the external interpreter. The link is static, against the ghci library and the boot libraries. Like all executable links, it passed -Wl,--gc-sections to a GNU linker. On libraries built with -split-sections (the release bindists), the section garbage collection of ld.bfd is the largest part of that link: with binutils 2.45, the link takes 3 times longer with --gc-sections than without. The program is temporary and its size is not important. Thus the iserv link does not use --gc-sections. Other executable links do not change. In CI, each ext-interp or ghci-ext test takes 12 to 18 times longer in the x86_64-linux-fedora43-release test job (split sections) than in the x86_64-linux-deb13-validate test job (no split sections) on the same runner, while a normal-way test takes the same time in both. This link is most of that difference. See Note [No --gc-sections for the on-demand iserv] in GHC.Runtime.Interpreter.C. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> - - - - - 09c965e2 by mangoiv at 2026-11-17T09:27:51-05:00 ci: make tests-primops run on marge CI test primops dispatch was disabled on the *full-ci group label to avoid dispatching for some of its configs but wasn't reenabled for marge ci runs which it ought to run Fixes #27765 - - - - - 83038fbe by David Eichmann at 2026-11-17T09:28:32-05:00 test driver refactor: replace `.format(**locals())` with f-string - - - - - bdf1860b by Alan Zimmerman at 2026-11-17T21:44:55+00:00 EPA: Use AnnList in DecBrl Via updating the TTG extension point payload - - - - - 166 changed files: - .gitignore - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - + changelog.d/27892 - + changelog.d/T28123 - + changelog.d/T9809-timer-manager-contention - + changelog.d/iserv-no-gc-sections.md - + changelog.d/make-depends-deprecate-doMkDependHS - + changelog.d/make-depends-json - + changelog.d/make-depends-multiple-home-units - + changelog.d/make-depends-streaming-output - + changelog.d/remove-long-deprecated-flags.md - + changelog.d/stage3-cross-bindists - compiler/GHC/CmmToC.hs - compiler/GHC/Core/Map/Expr.hs - compiler/GHC/Core/Map/Type.hs - compiler/GHC/Core/Opt/Arity.hs - compiler/GHC/Core/TyCo/Make.hs - compiler/GHC/CoreToStg.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/MakeFile.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Driver/Session/Units.hs - compiler/GHC/Hs/Expr.hs - compiler/GHC/Linker/Executable.hs - compiler/GHC/Parser.y - compiler/GHC/Parser/Errors/Ppr.hs - compiler/GHC/Parser/Errors/Types.hs - compiler/GHC/Parser/Header.hs - compiler/GHC/Parser/Lexer.x - compiler/GHC/Runtime/Interpreter/C.hs - compiler/GHC/Stg/Make.hs - compiler/GHC/Types/Tickish.hs - compiler/GHC/Utils/Json.hs - + distrib/configure.ac - docs/users_guide/codegens.rst - docs/users_guide/expected-undocumented-flags.txt - docs/users_guide/exts/control.rst - docs/users_guide/exts/ffi.rst - docs/users_guide/exts/pragmas.rst - docs/users_guide/ghc.rst - + docs/users_guide/make-depends-json-schema-1_0.json - docs/users_guide/profiling.rst - docs/users_guide/separate_compilation.rst - − docs/users_guide/what_glasgow_exts_does.rst - ghc/Main.hs - hadrian/src/BindistConfig.hs - hadrian/src/Oracles/Setting.hs - hadrian/src/Rules/BinaryDist.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Settings/Builders/RunTest.hs - hadrian/src/Settings/Packages.hs - libraries/base/tests/.gitignore - + libraries/base/tests/T9809.hs - libraries/base/tests/all.T - libraries/ghc-internal/src/GHC/Internal/Event/TimerManager.hs - rts/Linker.c - rts/LinkerInternals.h - rts/RtsSymbols.c - rts/RtsSymbols.h - rts/RtsUtils.c - rts/include/Rts.h - + rts/include/rts/RtsSymbols.h - rts/linker/PEi386.c - rts/rts.cabal - testsuite/README.md - testsuite/config/ghc - testsuite/driver/junit.py - testsuite/driver/my_typing.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/driver/testutil.py - testsuite/mk/test.mk - testsuite/tests/cmm/should_run/all.T - testsuite/tests/driver/Makefile - testsuite/tests/driver/T2464.hs - testsuite/tests/driver/T2464.stderr - + testsuite/tests/driver/mkdepend/Makefile - + testsuite/tests/driver/mkdepend/README.md - + testsuite/tests/driver/mkdepend/T24384/A.hs - + testsuite/tests/driver/mkdepend/T24384/C.hs - + testsuite/tests/driver/mkdepend/T24384/C.hs-boot - + testsuite/tests/driver/mkdepend/T24384/D.hs - + testsuite/tests/driver/mkdepend/T24384/E.hs - + testsuite/tests/driver/mkdepend/T24384/dep-internal/DepInternal.hs - + testsuite/tests/driver/mkdepend/T24384/dep-internal/dep-internal.pkg - + testsuite/tests/driver/mkdepend/T24384/dep-public/DepPublic.hs - + testsuite/tests/driver/mkdepend/T24384/dep-public/dep-public.pkg - + testsuite/tests/driver/mkdepend/T24384/dep/Dep.hs - + testsuite/tests/driver/mkdepend/T24384/dep/dep.pkg - + testsuite/tests/driver/mkdepend/T24384/foo.h - + testsuite/tests/driver/mkdepend/T24384/lib/B.hs - + testsuite/tests/driver/mkdepend/T24384/lib/B.hs-boot - + testsuite/tests/driver/mkdepend/T24384/preproc.sh - + testsuite/tests/driver/mkdepend/T24384a.stdout - + testsuite/tests/driver/mkdepend/T24384b.stdout - + testsuite/tests/driver/mkdepend/T24384c.stdout - + testsuite/tests/driver/mkdepend/all.T - + testsuite/tests/driver/mkdepend/format_json.sh - + testsuite/tests/driver/mkdepend/format_makefile.sh - + testsuite/tests/driver/mkdepend/mhu01/a/A/Base.hs - + testsuite/tests/driver/mkdepend/mhu01/a/A/Base.hs-boot - + testsuite/tests/driver/mkdepend/mhu01/a/A/TH.hs - + testsuite/tests/driver/mkdepend/mhu01/a/Util.hs - + testsuite/tests/driver/mkdepend/mhu01/b/B/Normal.hs - + testsuite/tests/driver/mkdepend/mhu01/b/B/Splice.hs - + testsuite/tests/driver/mkdepend/mhu01/b/Util.hs - + testsuite/tests/driver/mkdepend/mhu01/c/C.hs - + testsuite/tests/driver/mkdepend/mhu01/unitA - + testsuite/tests/driver/mkdepend/mhu01/unitB - + testsuite/tests/driver/mkdepend/mhu01/unitC - + testsuite/tests/driver/mkdepend/mhu02/A.hs - + testsuite/tests/driver/mkdepend/mhu02/B.hs - + testsuite/tests/driver/mkdepend/mhu02/pp.sh - + testsuite/tests/driver/mkdepend/mhu02/unitA - + testsuite/tests/driver/mkdepend/mhu02/unitB - + testsuite/tests/driver/mkdepend/mhu03/pkg/A.hs - + testsuite/tests/driver/mkdepend/mhu03/pkg/pp.sh - + testsuite/tests/driver/mkdepend/mhu03/unitA - + testsuite/tests/driver/mkdepend/mkdepend01.dep-json - + testsuite/tests/driver/mkdepend/mkdepend01.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend01/A.hs - + testsuite/tests/driver/mkdepend/mkdepend_mhu01a.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu01a.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend_mhu01b.stderr - + testsuite/tests/driver/mkdepend/mkdepend_mhu01c.stderr - + testsuite/tests/driver/mkdepend/mkdepend_mhu01d.dep-makefile - + testsuite/tests/driver/mkdepend/mkdepend_mhu01d.stderr - + testsuite/tests/driver/mkdepend/mkdepend_mhu02.dep-json - + testsuite/tests/driver/mkdepend/mkdepend_mhu03.dep-json - testsuite/tests/ffi/should_run/T2594.hs - testsuite/tests/ffi/should_run/ffi015.hs - testsuite/tests/ffi/should_run/fptr01.hs - testsuite/tests/ffi/should_run/fptrfail01.hs - testsuite/tests/ghci/linking/T25155_iserv_main.c - testsuite/tests/indexed-types/should_compile/all.T - testsuite/tests/indexed-types/should_fail/SkolemOccursLoop.hs - testsuite/tests/perf/compiler/large-project/all.T - + testsuite/tests/perf/compiler/large-project/large-project-mhu.sh - + testsuite/tests/pmcheck/should_compile/T27892a.hs - + testsuite/tests/pmcheck/should_compile/T28095.hs - testsuite/tests/pmcheck/should_compile/all.T - testsuite/tests/primops/should_run/all.T - testsuite/tests/rts/T17088.hs - testsuite/tests/rts/all.T - testsuite/tests/rts/pause-resume/all.T - testsuite/tests/rts/pause-resume/pause_resume_via_safe_ffi_concurrent.hs - + testsuite/tests/rts/symbols/Main.hs - + testsuite/tests/rts/symbols/Makefile - + testsuite/tests/rts/symbols/all.T - + testsuite/tests/rts/symbols/dumpDeclaredSymbols.c - + testsuite/tests/rts/symbols/rts-check-symbols.sh - + testsuite/tests/rts/symbols/rts-check-symbols.stdout - + testsuite/tests/simplCore/should_compile/T27892.hs - + testsuite/tests/simplCore/should_compile/T27892.stderr - + testsuite/tests/simplCore/should_compile/T28095a.hs - + testsuite/tests/simplCore/should_compile/T28095a.stderr - testsuite/tests/simplCore/should_compile/all.T - + testsuite/tests/vdq-rta/should_compile/T28123.hs - testsuite/tests/vdq-rta/should_compile/all.T - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/39971ce7384567a5e1ec447e6c06f88... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/39971ce7384567a5e1ec447e6c06f88... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help