[Git][ghc/ghc][wip/fix-26636] 14 commits: hadrian: add support for building with UndefinedBehaviorSanitizer
recursion-ninja pushed to branch wip/fix-26636 at Glasgow Haskell Compiler / GHC Commits: 96fce8d0 by Cheng Shao at 2025-12-12T01:17:51+01:00 hadrian: add support for building with UndefinedBehaviorSanitizer This patch adds a +ubsan flavour transformer to hadrian to build all stage1+ C/C++ code with UndefinedBehaviorSanitizer. This is particularly useful to catch potential undefined behavior in the RTS codebase. - - - - - f7a06d8c by Cheng Shao at 2025-12-12T01:17:51+01:00 ci: update alpine/fedora & add ubsan job This patch updates alpine image to 3.23, fedora image to 43, and adds a `x86_64-linux-fedora43-validate+debug_info+ubsan` job that's run in validate/nightly pipelines to catch undefined behavior in the RTS codebase. - - - - - 2ccd11ca by Cheng Shao at 2025-12-12T01:17:51+01:00 rts: fix zero-length VLA undefined behavior in interpretBCO This commit fixes a zero-length VLA undefined behavior in interpretBCO, caught by UBSan: ``` +rts/Interpreter.c:3133:19: runtime variable length array bound evaluates to non-positive value 0 ``` - - - - - 4156ed19 by Cheng Shao at 2025-12-12T01:17:51+01:00 rts: fix unaligned ReadSpB in interpretBCO This commit fixes unaligned ReadSpB in interpretBCO, caught by UBSan: ``` +rts/Interpreter.c:2174:64: runtime load of misaligned address 0x004202059dd1 for type 'StgWord', which requires 8 byte alignment ``` To perform proper unaligned read, we define StgUnalignedWord as a type alias of StgWord with aligned(1) attribute, and load StgUnalignedWord instead of StgWord in ReadSpB, so the C compiler is aware that we're not loading with natural alignment. - - - - - fef89fb9 by Cheng Shao at 2025-12-12T01:17:51+01:00 rts: fix signed integer overflow in subword arithmetic in interpretBCO This commit fixes signed integer overflow in subword arithmetic in interpretBCO, see added note for detailed explanation. - - - - - 3c001377 by Cheng Shao at 2025-12-13T05:03:15-05:00 ci: use treeless fetch for perf notes This patch improves the ci logic for fetching perf notes by using treeless fetch (https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-s...), to avoid downloading all blobs of the perf notes repo at once, and only fetch the actually required blobs on-demand when needed. This makes the initial `test-metrics.sh pull` operation much faster, and also more robust, since we are seeing an increasing rate of 504 errors in CI when fetching all perf notes at once, which is a major source of CI flakiness at this point. Co-authored-by: Codex <codex@openai.com> - - - - - 123a8d77 by Peter Trommler at 2025-12-13T05:03:57-05:00 Cmm: remove restriction in MachOp folding - - - - - 0b54b5fd by Andreas Klebinger at 2025-12-13T05:04:38-05:00 Remove explicit Typeable deriviations. - - - - - 08b13f7b by Cheng Shao at 2025-12-13T05:05:18-05:00 ci: set gc.auto=0 during setup stage This patch sets `gc.auto=0` during `setup` stage of CI, see added comment for detailed explanation. - - - - - 3b5aecb5 by Ben Gamari at 2025-12-13T23:43:10+01:00 Bump exceptions submodule to 0.10.11 - - - - - c32de3b0 by Johan Förberg at 2025-12-15T02:36:03-05:00 base: Define Semigroup and Monoid instances for lazy ST CLC proposal: https://github.com/haskell/core-libraries-committee/issues/374 Fixes #26581 - - - - - 4f8b660c by mangoiv at 2025-12-15T02:37:05-05:00 ci: do not require nightly cabal-reinstall job to succeed - - - - - 1d13e8c5 by Recursion Ninja at 2025-12-15T09:03:15-05:00 Removing the 'Data' instance for 'InstEnv'. The 'Data' instance is blocking work on Trees that Grow, and the 'Data' instance seem to have been added without a clear purpose. - - - - - 5c130f56 by Recursion Ninja at 2025-12-15T09:03:50-05:00 'Decouple Language.Haskell.Syntax.Decls' from 'GHC.Unit.Module.Warnings' - - - - - 55 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - .gitlab/test-metrics.sh - compiler/GHC/Builtin/Utils.hs - compiler/GHC/Cmm/Opt.hs - compiler/GHC/Core/InstEnv.hs - compiler/GHC/Hs/Decls.hs - compiler/GHC/Hs/Instances.hs - compiler/GHC/Iface/Syntax.hs - compiler/GHC/Iface/Warnings.hs - compiler/GHC/Parser.y - compiler/GHC/Rename/Module.hs - compiler/GHC/Rename/Utils.hs - compiler/GHC/Tc/Deriv.hs - compiler/GHC/Tc/Deriv/Utils.hs - compiler/GHC/Tc/Errors/Ppr.hs - compiler/GHC/Tc/Errors/Types.hs - compiler/GHC/Tc/Types/Origin.hs - compiler/GHC/Tc/Utils/Instantiate.hs - compiler/GHC/Types/DefaultEnv.hs - compiler/GHC/Types/Error/Codes.hs - compiler/GHC/Unit/Module/Warnings.hs - compiler/Language/Haskell/Syntax/Decls.hs - compiler/Language/Haskell/Syntax/Extension.hs - hadrian/doc/flavours.md - hadrian/src/Flavour.hs - hadrian/src/Hadrian/Haskell/Cabal/Type.hs - hadrian/src/Hadrian/Haskell/Hash.hs - hadrian/src/Hadrian/Oracles/ArgsHash.hs - hadrian/src/Hadrian/Oracles/Cabal/Type.hs - hadrian/src/Hadrian/Oracles/DirectoryContents.hs - hadrian/src/Hadrian/Oracles/Path.hs - hadrian/src/Hadrian/Oracles/TextFile.hs - hadrian/src/Hadrian/Utilities.hs - hadrian/src/Oracles/Flavour.hs - hadrian/src/Oracles/ModuleFiles.hs - libraries/base/changelog.md - libraries/exceptions - libraries/ghc-internal/src/GHC/Internal/Control/Monad/ST/Lazy/Imp.hs - + rts/.ubsan-suppressions - rts/Interpreter.c - rts/include/stg/Types.h - rts/rts.cabal - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 - utils/check-exact/ExactPrint.hs - utils/haddock/haddock-api/src/Haddock/Interface/Create.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ffa6ae3d44d8e84cbbbcb3ec907da6a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ffa6ae3d44d8e84cbbbcb3ec907da6a... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
recursion-ninja (@recursion-ninja)