Cheng Shao pushed to branch wip/ubsan at Glasgow Haskell Compiler / GHC

Commits:

14 changed files:

Changes:

  • .gitlab-ci.yml
    ... ... @@ -11,7 +11,7 @@ variables:
    11 11
       GIT_SSL_NO_VERIFY: "1"
    
    12 12
     
    
    13 13
       # Commit of ghc/ci-images repository from which to pull Docker images
    
    14
    -  DOCKER_REV: a97d5c67d803c6b3811c6cccdf33dc8e9d7eafe3
    
    14
    +  DOCKER_REV: 91427f8ccea7dd472d6e0e44db858b4003aef826
    
    15 15
     
    
    16 16
       # Sequential version number of all cached things.
    
    17 17
       # Bump to invalidate GitLab CI cache.
    
    ... ... @@ -444,14 +444,14 @@ hadrian-ghc-in-ghci:
    444 444
     hadrian-multi:
    
    445 445
       stage: testing
    
    446 446
       needs:
    
    447
    -    - job: x86_64-linux-fedora42-release
    
    447
    +    - job: x86_64-linux-fedora43-release
    
    448 448
           optional: true
    
    449
    -    - job: nightly-x86_64-linux-fedora42-release
    
    449
    +    - job: nightly-x86_64-linux-fedora43-release
    
    450 450
           optional: true
    
    451
    -    - job: release-x86_64-linux-fedora42-release
    
    451
    +    - job: release-x86_64-linux-fedora43-release
    
    452 452
           optional: true
    
    453 453
       dependencies: null
    
    454
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
    
    454
    +  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV"
    
    455 455
       before_script:
    
    456 456
         # workaround for docker permissions
    
    457 457
         - sudo chown ghc:ghc -R .
    
    ... ... @@ -471,7 +471,7 @@ hadrian-multi:
    471 471
         - ls
    
    472 472
         - |
    
    473 473
           mkdir tmp
    
    474
    -      tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
    
    474
    +      tar -xf ghc-x86_64-linux-fedora43-release.tar.xz -C tmp
    
    475 475
           pushd tmp/ghc-*/
    
    476 476
           ./configure --prefix=$root
    
    477 477
           make install
    
    ... ... @@ -533,17 +533,17 @@ test-cabal-reinstall-x86_64-linux-deb10:
    533 533
     abi-test-nightly:
    
    534 534
       stage: full-build
    
    535 535
       needs:
    
    536
    -    - job: nightly-x86_64-linux-fedora42-release-hackage
    
    537
    -    - job: nightly-x86_64-linux-fedora42-release
    
    536
    +    - job: nightly-x86_64-linux-fedora43-release-hackage
    
    537
    +    - job: nightly-x86_64-linux-fedora43-release
    
    538 538
       tags:
    
    539 539
         - x86_64-linux
    
    540
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
    
    540
    +  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV"
    
    541 541
       dependencies: null
    
    542 542
       before_script:
    
    543 543
         - mkdir -p normal
    
    544 544
         - mkdir -p hackage
    
    545
    -    - tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C normal/
    
    546
    -    - tar -xf ghc-x86_64-linux-fedora42-release-hackage_docs.tar.xz -C hackage/
    
    545
    +    - tar -xf ghc-x86_64-linux-fedora43-release.tar.xz -C normal/
    
    546
    +    - tar -xf ghc-x86_64-linux-fedora43-release-hackage_docs.tar.xz -C hackage/
    
    547 547
       script:
    
    548 548
         - .gitlab/ci.sh compare_interfaces_of "normal/ghc-*" "hackage/ghc-*"
    
    549 549
       artifacts:
    
    ... ... @@ -620,9 +620,9 @@ doc-tarball:
    620 620
     hackage-doc-tarball:
    
    621 621
       stage: packaging
    
    622 622
       needs:
    
    623
    -    - job: nightly-x86_64-linux-fedora42-release-hackage
    
    623
    +    - job: nightly-x86_64-linux-fedora43-release-hackage
    
    624 624
           optional: true
    
    625
    -    - job: release-x86_64-linux-fedora42-release-hackage
    
    625
    +    - job: release-x86_64-linux-fedora43-release-hackage
    
    626 626
           optional: true
    
    627 627
         - job: source-tarball
    
    628 628
       tags:
    
    ... ... @@ -639,7 +639,7 @@ hackage-doc-tarball:
    639 639
           - hackage_docs
    
    640 640
       before_script:
    
    641 641
         - tar -xf ghc-*[0-9]-src.tar.xz
    
    642
    -    - tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C ghc*/
    
    642
    +    - tar -xf ghc-x86_64-linux-fedora43-release.tar.xz -C ghc*/
    
    643 643
       script:
    
    644 644
         - cd ghc*/
    
    645 645
         - mv .gitlab/rel_eng/upload_ghc_libs.py .
    
    ... ... @@ -765,7 +765,7 @@ test-bootstrap:
    765 765
     # Triggering jobs in the ghc/head.hackage project requires that we have a job
    
    766 766
     # token for that repository. Furthermore the head.hackage CI job must have
    
    767 767
     # access to an unprivileged access token with the ability to query the ghc/ghc
    
    768
    -# project such that it can find the job ID of the fedora42 job for the current
    
    768
    +# project such that it can find the job ID of the fedora43 job for the current
    
    769 769
     # pipeline.
    
    770 770
     #
    
    771 771
     # hackage-lint: Can be triggered on any MR, normal validate pipeline or nightly build.
    
    ... ... @@ -852,7 +852,7 @@ nightly-hackage-lint:
    852 852
     
    
    853 853
     nightly-hackage-perf:
    
    854 854
       needs:
    
    855
    -    - job: nightly-x86_64-linux-fedora42-release
    
    855
    +    - job: nightly-x86_64-linux-fedora43-release
    
    856 856
           optional: true
    
    857 857
           artifacts: false
    
    858 858
         - job: nightly-aarch64-linux-deb12-validate
    
    ... ... @@ -871,7 +871,7 @@ nightly-hackage-perf:
    871 871
     
    
    872 872
     release-hackage-lint:
    
    873 873
       needs:
    
    874
    -    - job: release-x86_64-linux-fedora42-release
    
    874
    +    - job: release-x86_64-linux-fedora43-release
    
    875 875
           optional: true
    
    876 876
           artifacts: false
    
    877 877
         - job: release-aarch64-linux-deb12-release+no_split_sections
    
    ... ... @@ -957,13 +957,13 @@ perf-nofib:
    957 957
       allow_failure: true
    
    958 958
       stage: testing
    
    959 959
       needs:
    
    960
    -    - job: x86_64-linux-fedora42-release
    
    960
    +    - job: x86_64-linux-fedora43-release
    
    961 961
           optional: true
    
    962
    -    - job: nightly-x86_64-linux-fedora42-release
    
    962
    +    - job: nightly-x86_64-linux-fedora43-release
    
    963 963
           optional: true
    
    964
    -    - job: release-x86_64-linux-fedora42-release
    
    964
    +    - job: release-x86_64-linux-fedora43-release
    
    965 965
           optional: true
    
    966
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
    
    966
    +  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV"
    
    967 967
       rules:
    
    968 968
         - when: never
    
    969 969
         - *full-ci
    
    ... ... @@ -976,7 +976,7 @@ perf-nofib:
    976 976
         - root=$(pwd)/ghc
    
    977 977
         - |
    
    978 978
           mkdir tmp
    
    979
    -      tar -xf ../ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
    
    979
    +      tar -xf ../ghc-x86_64-linux-fedora43-release.tar.xz -C tmp
    
    980 980
           pushd tmp/ghc-*/
    
    981 981
           ./configure --prefix=$root
    
    982 982
           make install
    
    ... ... @@ -1000,14 +1000,14 @@ perf-nofib:
    1000 1000
     perf:
    
    1001 1001
       stage: testing
    
    1002 1002
       needs:
    
    1003
    -    - job: x86_64-linux-fedora42-release
    
    1003
    +    - job: x86_64-linux-fedora43-release
    
    1004 1004
           optional: true
    
    1005
    -    - job: nightly-x86_64-linux-fedora42-release
    
    1005
    +    - job: nightly-x86_64-linux-fedora43-release
    
    1006 1006
           optional: true
    
    1007
    -    - job: release-x86_64-linux-fedora42-release
    
    1007
    +    - job: release-x86_64-linux-fedora43-release
    
    1008 1008
           optional: true
    
    1009 1009
       dependencies: null
    
    1010
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
    
    1010
    +  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV"
    
    1011 1011
       tags:
    
    1012 1012
         - x86_64-linux-perf
    
    1013 1013
       before_script:
    
    ... ... @@ -1017,7 +1017,7 @@ perf:
    1017 1017
         - root=$(pwd)/ghc
    
    1018 1018
         - |
    
    1019 1019
           mkdir tmp
    
    1020
    -      tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
    
    1020
    +      tar -xf ghc-x86_64-linux-fedora43-release.tar.xz -C tmp
    
    1021 1021
           pushd tmp/ghc-*/
    
    1022 1022
           ./configure --prefix=$root
    
    1023 1023
           make install
    
    ... ... @@ -1041,14 +1041,14 @@ perf:
    1041 1041
     abi-test:
    
    1042 1042
       stage: testing
    
    1043 1043
       needs:
    
    1044
    -    - job: x86_64-linux-fedora42-release
    
    1044
    +    - job: x86_64-linux-fedora43-release
    
    1045 1045
           optional: true
    
    1046
    -    - job: nightly-x86_64-linux-fedora42-release
    
    1046
    +    - job: nightly-x86_64-linux-fedora43-release
    
    1047 1047
           optional: true
    
    1048
    -    - job: release-x86_64-linux-fedora42-release
    
    1048
    +    - job: release-x86_64-linux-fedora43-release
    
    1049 1049
           optional: true
    
    1050 1050
       dependencies: null
    
    1051
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
    
    1051
    +  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV"
    
    1052 1052
       rules:
    
    1053 1053
         - if: $CI_MERGE_REQUEST_ID
    
    1054 1054
         - if: '$CI_COMMIT_BRANCH == "master"'
    
    ... ... @@ -1059,7 +1059,7 @@ abi-test:
    1059 1059
         - root=$(pwd)/ghc
    
    1060 1060
         - |
    
    1061 1061
           mkdir tmp
    
    1062
    -      tar -xf ghc-x86_64-linux-fedora42-release.tar.xz -C tmp
    
    1062
    +      tar -xf ghc-x86_64-linux-fedora43-release.tar.xz -C tmp
    
    1063 1063
           pushd tmp/ghc-*/
    
    1064 1064
           ./configure --prefix=$root
    
    1065 1065
           make install
    
    ... ... @@ -1214,7 +1214,7 @@ ghcup-metadata-nightly:
    1214 1214
       extends: .ghcup-metadata
    
    1215 1215
       # Explicit needs for validate pipeline because we only need certain bindists
    
    1216 1216
       needs:
    
    1217
    -    - job: nightly-x86_64-linux-fedora42-release
    
    1217
    +    - job: nightly-x86_64-linux-fedora43-release
    
    1218 1218
           artifacts: false
    
    1219 1219
         - job: nightly-x86_64-linux-ubuntu24_04-validate
    
    1220 1220
           artifacts: false
    
    ... ... @@ -1265,7 +1265,7 @@ ghcup-metadata-nightly:
    1265 1265
     # Update the ghcup metadata with information about this nightly pipeline
    
    1266 1266
     ghcup-metadata-nightly-push:
    
    1267 1267
       stage: deploy
    
    1268
    -  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV"
    
    1268
    +  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV"
    
    1269 1269
       dependencies: null
    
    1270 1270
       tags:
    
    1271 1271
         - x86_64-linux
    

  • .gitlab/generate-ci/gen_ci.hs
    ... ... @@ -82,7 +82,7 @@ The generated names for the jobs is important as there are a few downstream cons
    82 82
     of the jobs artifacts. Therefore some care should be taken if changing the generated
    
    83 83
     names of jobs to update these other places.
    
    84 84
     
    
    85
    -1. fedora42 jobs are required by head.hackage
    
    85
    +1. fedora43 jobs are required by head.hackage
    
    86 86
     2. The fetch-gitlab release utility pulls release artifacts from the
    
    87 87
     3. The ghc-head-from script downloads release artifacts based on a pipeline change.
    
    88 88
     4. Some subsequent CI jobs have explicit dependencies (for example docs-tarball, perf, perf-nofib)
    
    ... ... @@ -118,7 +118,7 @@ data LinuxDistro
    118 118
       | Debian11Js
    
    119 119
       | Debian10
    
    120 120
       | Debian9
    
    121
    -  | Fedora42
    
    121
    +  | Fedora43
    
    122 122
       | Ubuntu2404LoongArch64
    
    123 123
       | Ubuntu2404
    
    124 124
       | Ubuntu2204
    
    ... ... @@ -161,6 +161,7 @@ data BuildConfig
    161 161
                     , hostFullyStatic :: Bool
    
    162 162
                     , tablesNextToCode :: Bool
    
    163 163
                     , threadSanitiser :: Bool
    
    164
    +                , ubsan :: Bool
    
    164 165
                     , noSplitSections :: Bool
    
    165 166
                     , validateNonmovingGc :: Bool
    
    166 167
                     , textWithSIMDUTF :: Bool
    
    ... ... @@ -186,6 +187,7 @@ mkJobFlavour BuildConfig{..} = Flavour buildFlavour opts
    186 187
                [FullyStatic | fullyStatic] ++
    
    187 188
                [HostFullyStatic | hostFullyStatic] ++
    
    188 189
                [ThreadSanitiser | threadSanitiser] ++
    
    190
    +           [UBSan | ubsan] ++
    
    189 191
                [NoSplitSections | noSplitSections, buildFlavour == Release ] ++
    
    190 192
                [BootNonmovingGc | validateNonmovingGc ] ++
    
    191 193
                [TextWithSIMDUTF | textWithSIMDUTF]
    
    ... ... @@ -198,6 +200,7 @@ data FlavourTrans =
    198 200
         | FullyStatic
    
    199 201
         | HostFullyStatic
    
    200 202
         | ThreadSanitiser
    
    203
    +    | UBSan
    
    201 204
         | NoSplitSections
    
    202 205
         | BootNonmovingGc
    
    203 206
         | TextWithSIMDUTF
    
    ... ... @@ -226,6 +229,7 @@ vanilla = BuildConfig
    226 229
       , hostFullyStatic = False
    
    227 230
       , tablesNextToCode = True
    
    228 231
       , threadSanitiser = False
    
    232
    +  , ubsan = False
    
    229 233
       , noSplitSections = False
    
    230 234
       , validateNonmovingGc = False
    
    231 235
       , textWithSIMDUTF = False
    
    ... ... @@ -279,6 +283,9 @@ llvm = vanilla { llvmBootstrap = True }
    279 283
     tsan :: BuildConfig
    
    280 284
     tsan = vanilla { threadSanitiser = True }
    
    281 285
     
    
    286
    +enableUBSan :: BuildConfig
    
    287
    +enableUBSan = vanilla { withDwarf = True, ubsan = True }
    
    288
    +
    
    282 289
     noTntc :: BuildConfig
    
    283 290
     noTntc = vanilla { tablesNextToCode = False }
    
    284 291
     
    
    ... ... @@ -318,7 +325,7 @@ distroName Debian12Riscv = "deb12-riscv"
    318 325
     distroName Debian12Wine  = "deb12-wine"
    
    319 326
     distroName Debian10      = "deb10"
    
    320 327
     distroName Debian9       = "deb9"
    
    321
    -distroName Fedora42      = "fedora42"
    
    328
    +distroName Fedora43      = "fedora43"
    
    322 329
     distroName Ubuntu2404LoongArch64 = "ubuntu24_04-loongarch"
    
    323 330
     distroName Ubuntu1804    = "ubuntu18_04"
    
    324 331
     distroName Ubuntu2004    = "ubuntu20_04"
    
    ... ... @@ -373,6 +380,7 @@ flavourString (Flavour base trans) = base_string base ++ concatMap (("+" ++) . f
    373 380
         flavour_string FullyStatic = "fully_static"
    
    374 381
         flavour_string HostFullyStatic = "host_fully_static"
    
    375 382
         flavour_string ThreadSanitiser = "thread_sanitizer_cmm"
    
    383
    +    flavour_string UBSan = "ubsan"
    
    376 384
         flavour_string NoSplitSections = "no_split_sections"
    
    377 385
         flavour_string BootNonmovingGc = "boot_nonmoving_gc"
    
    378 386
         flavour_string TextWithSIMDUTF = "text_simdutf"
    
    ... ... @@ -1196,13 +1204,22 @@ rhel_x86 =
    1196 1204
     
    
    1197 1205
     fedora_x86 :: [JobGroup Job]
    
    1198 1206
     fedora_x86 =
    
    1199
    -  [ -- Fedora42 job is always built with perf so there's one job in the normal
    
    1207
    +  [ -- Fedora43 job is always built with perf so there's one job in the normal
    
    1200 1208
         -- validate pipeline which is built with perf.
    
    1201
    -    fastCI (standardBuildsWithConfig Amd64 (Linux Fedora42) releaseConfig)
    
    1209
    +    fastCI (standardBuildsWithConfig Amd64 (Linux Fedora43) releaseConfig)
    
    1202 1210
         -- This job is only for generating head.hackage docs
    
    1203
    -  , hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora42) releaseConfig))
    
    1204
    -  , disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora42) dwarf)
    
    1205
    -  , disableValidate (standardBuilds Amd64 (Linux Fedora42))
    
    1211
    +  , hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora43) releaseConfig))
    
    1212
    +  , disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora43) dwarf)
    
    1213
    +  , disableValidate (standardBuilds Amd64 (Linux Fedora43))
    
    1214
    +    -- For UBSan jobs, only enable for validate/nightly pipelines.
    
    1215
    +    -- Also disable docs since it's not the point for UBSan jobs.
    
    1216
    +  , modifyJobs
    
    1217
    +      ( setVariable "HADRIAN_ARGS" "--docs=none"
    
    1218
    +          . addVariable
    
    1219
    +            "UBSAN_OPTIONS"
    
    1220
    +            "suppressions=$CI_PROJECT_DIR/rts/.ubsan-suppressions"
    
    1221
    +      )
    
    1222
    +      $ validateBuilds Amd64 (Linux Fedora43) enableUBSan
    
    1206 1223
       ]
    
    1207 1224
       where
    
    1208 1225
         hackage_doc_job = rename (<> "-hackage") . modifyJobs (addVariable "HADRIAN_ARGS" "--haddock-for-hackage")
    
    ... ... @@ -1364,7 +1381,7 @@ platform_mapping = Map.map go combined_result
    1364 1381
                     , "x86_64-linux-deb11-validate"
    
    1365 1382
                     , "x86_64-linux-deb12-validate"
    
    1366 1383
                     , "x86_64-linux-deb10-validate+debug_info"
    
    1367
    -                , "x86_64-linux-fedora42-release"
    
    1384
    +                , "x86_64-linux-fedora43-release"
    
    1368 1385
                     , "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
    
    1369 1386
                     , "x86_64-windows-validate"
    
    1370 1387
                     , "aarch64-linux-deb12-validate"
    
    ... ... @@ -1379,13 +1396,13 @@ platform_mapping = Map.map go combined_result
    1379 1396
                     , "nightly-aarch64-linux-deb12-wine-int_native-cross_aarch64-unknown-mingw32-validate"
    
    1380 1397
                     , "nightly-x86_64-linux-alpine3_12-validate+fully_static"
    
    1381 1398
                     , "nightly-x86_64-linux-deb10-validate"
    
    1382
    -                , "nightly-x86_64-linux-fedora42-release"
    
    1399
    +                , "nightly-x86_64-linux-fedora43-release"
    
    1383 1400
                     , "nightly-x86_64-windows-validate"
    
    1384 1401
                     , "release-x86_64-linux-alpine3_12-release+fully_static+no_split_sections"
    
    1385 1402
                     , "release-x86_64-linux-deb10-release"
    
    1386 1403
                     , "release-x86_64-linux-deb11-release"
    
    1387 1404
                     , "release-x86_64-linux-deb12-release"
    
    1388
    -                , "release-x86_64-linux-fedora42-release"
    
    1405
    +                , "release-x86_64-linux-fedora43-release"
    
    1389 1406
                     , "release-x86_64-windows-release"
    
    1390 1407
                     ]
    
    1391 1408
     
    

  • .gitlab/jobs.yaml
    ... ... @@ -2942,7 +2942,7 @@
    2942 2942
           "XZ_OPT": "-9"
    
    2943 2943
         }
    
    2944 2944
       },
    
    2945
    -  "nightly-x86_64-linux-fedora42-release": {
    
    2945
    +  "nightly-x86_64-linux-fedora43-release": {
    
    2946 2946
         "after_script": [
    
    2947 2947
           ".gitlab/ci.sh save_cache",
    
    2948 2948
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -2953,7 +2953,7 @@
    2953 2953
         "artifacts": {
    
    2954 2954
           "expire_in": "8 weeks",
    
    2955 2955
           "paths": [
    
    2956
    -        "ghc-x86_64-linux-fedora42-release.tar.xz",
    
    2956
    +        "ghc-x86_64-linux-fedora43-release.tar.xz",
    
    2957 2957
             "junit.xml",
    
    2958 2958
             "unexpected-test-output.tar.gz"
    
    2959 2959
           ],
    
    ... ... @@ -2963,14 +2963,14 @@
    2963 2963
           "when": "always"
    
    2964 2964
         },
    
    2965 2965
         "cache": {
    
    2966
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    2966
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    2967 2967
           "paths": [
    
    2968 2968
             "cabal-cache",
    
    2969 2969
             "toolchain"
    
    2970 2970
           ]
    
    2971 2971
         },
    
    2972 2972
         "dependencies": [],
    
    2973
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    2973
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    2974 2974
         "needs": [
    
    2975 2975
           {
    
    2976 2976
             "artifacts": false,
    
    ... ... @@ -2996,16 +2996,16 @@
    2996 2996
         ],
    
    2997 2997
         "variables": {
    
    2998 2998
           "BIGNUM_BACKEND": "gmp",
    
    2999
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
    
    2999
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release",
    
    3000 3000
           "BUILD_FLAVOUR": "release",
    
    3001 3001
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3002 3002
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3003 3003
           "RUNTEST_ARGS": "",
    
    3004
    -      "TEST_ENV": "x86_64-linux-fedora42-release",
    
    3004
    +      "TEST_ENV": "x86_64-linux-fedora43-release",
    
    3005 3005
           "XZ_OPT": "-9"
    
    3006 3006
         }
    
    3007 3007
       },
    
    3008
    -  "nightly-x86_64-linux-fedora42-release-hackage": {
    
    3008
    +  "nightly-x86_64-linux-fedora43-release-hackage": {
    
    3009 3009
         "after_script": [
    
    3010 3010
           ".gitlab/ci.sh save_cache",
    
    3011 3011
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -3016,7 +3016,7 @@
    3016 3016
         "artifacts": {
    
    3017 3017
           "expire_in": "8 weeks",
    
    3018 3018
           "paths": [
    
    3019
    -        "ghc-x86_64-linux-fedora42-release.tar.xz",
    
    3019
    +        "ghc-x86_64-linux-fedora43-release.tar.xz",
    
    3020 3020
             "junit.xml",
    
    3021 3021
             "unexpected-test-output.tar.gz"
    
    3022 3022
           ],
    
    ... ... @@ -3026,14 +3026,14 @@
    3026 3026
           "when": "always"
    
    3027 3027
         },
    
    3028 3028
         "cache": {
    
    3029
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    3029
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    3030 3030
           "paths": [
    
    3031 3031
             "cabal-cache",
    
    3032 3032
             "toolchain"
    
    3033 3033
           ]
    
    3034 3034
         },
    
    3035 3035
         "dependencies": [],
    
    3036
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    3036
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    3037 3037
         "needs": [
    
    3038 3038
           {
    
    3039 3039
             "artifacts": false,
    
    ... ... @@ -3059,17 +3059,17 @@
    3059 3059
         ],
    
    3060 3060
         "variables": {
    
    3061 3061
           "BIGNUM_BACKEND": "gmp",
    
    3062
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
    
    3062
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release",
    
    3063 3063
           "BUILD_FLAVOUR": "release",
    
    3064 3064
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3065 3065
           "HADRIAN_ARGS": "--haddock-for-hackage",
    
    3066 3066
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3067 3067
           "RUNTEST_ARGS": "",
    
    3068
    -      "TEST_ENV": "x86_64-linux-fedora42-release",
    
    3068
    +      "TEST_ENV": "x86_64-linux-fedora43-release",
    
    3069 3069
           "XZ_OPT": "-9"
    
    3070 3070
         }
    
    3071 3071
       },
    
    3072
    -  "nightly-x86_64-linux-fedora42-validate": {
    
    3072
    +  "nightly-x86_64-linux-fedora43-validate": {
    
    3073 3073
         "after_script": [
    
    3074 3074
           ".gitlab/ci.sh save_cache",
    
    3075 3075
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -3080,7 +3080,7 @@
    3080 3080
         "artifacts": {
    
    3081 3081
           "expire_in": "8 weeks",
    
    3082 3082
           "paths": [
    
    3083
    -        "ghc-x86_64-linux-fedora42-validate.tar.xz",
    
    3083
    +        "ghc-x86_64-linux-fedora43-validate.tar.xz",
    
    3084 3084
             "junit.xml",
    
    3085 3085
             "unexpected-test-output.tar.gz"
    
    3086 3086
           ],
    
    ... ... @@ -3090,14 +3090,14 @@
    3090 3090
           "when": "always"
    
    3091 3091
         },
    
    3092 3092
         "cache": {
    
    3093
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    3093
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    3094 3094
           "paths": [
    
    3095 3095
             "cabal-cache",
    
    3096 3096
             "toolchain"
    
    3097 3097
           ]
    
    3098 3098
         },
    
    3099 3099
         "dependencies": [],
    
    3100
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    3100
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    3101 3101
         "needs": [
    
    3102 3102
           {
    
    3103 3103
             "artifacts": false,
    
    ... ... @@ -3123,16 +3123,16 @@
    3123 3123
         ],
    
    3124 3124
         "variables": {
    
    3125 3125
           "BIGNUM_BACKEND": "gmp",
    
    3126
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate",
    
    3126
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-validate",
    
    3127 3127
           "BUILD_FLAVOUR": "validate",
    
    3128 3128
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3129 3129
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3130 3130
           "RUNTEST_ARGS": "",
    
    3131
    -      "TEST_ENV": "x86_64-linux-fedora42-validate",
    
    3131
    +      "TEST_ENV": "x86_64-linux-fedora43-validate",
    
    3132 3132
           "XZ_OPT": "-9"
    
    3133 3133
         }
    
    3134 3134
       },
    
    3135
    -  "nightly-x86_64-linux-fedora42-validate+debug_info": {
    
    3135
    +  "nightly-x86_64-linux-fedora43-validate+debug_info": {
    
    3136 3136
         "after_script": [
    
    3137 3137
           ".gitlab/ci.sh save_cache",
    
    3138 3138
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -3143,7 +3143,7 @@
    3143 3143
         "artifacts": {
    
    3144 3144
           "expire_in": "8 weeks",
    
    3145 3145
           "paths": [
    
    3146
    -        "ghc-x86_64-linux-fedora42-validate+debug_info.tar.xz",
    
    3146
    +        "ghc-x86_64-linux-fedora43-validate+debug_info.tar.xz",
    
    3147 3147
             "junit.xml",
    
    3148 3148
             "unexpected-test-output.tar.gz"
    
    3149 3149
           ],
    
    ... ... @@ -3153,14 +3153,14 @@
    3153 3153
           "when": "always"
    
    3154 3154
         },
    
    3155 3155
         "cache": {
    
    3156
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    3156
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    3157 3157
           "paths": [
    
    3158 3158
             "cabal-cache",
    
    3159 3159
             "toolchain"
    
    3160 3160
           ]
    
    3161 3161
         },
    
    3162 3162
         "dependencies": [],
    
    3163
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    3163
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    3164 3164
         "needs": [
    
    3165 3165
           {
    
    3166 3166
             "artifacts": false,
    
    ... ... @@ -3186,12 +3186,77 @@
    3186 3186
         ],
    
    3187 3187
         "variables": {
    
    3188 3188
           "BIGNUM_BACKEND": "gmp",
    
    3189
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate+debug_info",
    
    3189
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-validate+debug_info",
    
    3190 3190
           "BUILD_FLAVOUR": "validate+debug_info",
    
    3191 3191
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3192 3192
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3193 3193
           "RUNTEST_ARGS": "",
    
    3194
    -      "TEST_ENV": "x86_64-linux-fedora42-validate+debug_info",
    
    3194
    +      "TEST_ENV": "x86_64-linux-fedora43-validate+debug_info",
    
    3195
    +      "XZ_OPT": "-9"
    
    3196
    +    }
    
    3197
    +  },
    
    3198
    +  "nightly-x86_64-linux-fedora43-validate+debug_info+ubsan": {
    
    3199
    +    "after_script": [
    
    3200
    +      ".gitlab/ci.sh save_cache",
    
    3201
    +      ".gitlab/ci.sh save_test_output",
    
    3202
    +      ".gitlab/ci.sh clean",
    
    3203
    +      "cat ci_timings.txt"
    
    3204
    +    ],
    
    3205
    +    "allow_failure": false,
    
    3206
    +    "artifacts": {
    
    3207
    +      "expire_in": "8 weeks",
    
    3208
    +      "paths": [
    
    3209
    +        "ghc-x86_64-linux-fedora43-validate+debug_info+ubsan.tar.xz",
    
    3210
    +        "junit.xml",
    
    3211
    +        "unexpected-test-output.tar.gz"
    
    3212
    +      ],
    
    3213
    +      "reports": {
    
    3214
    +        "junit": "junit.xml"
    
    3215
    +      },
    
    3216
    +      "when": "always"
    
    3217
    +    },
    
    3218
    +    "cache": {
    
    3219
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    3220
    +      "paths": [
    
    3221
    +        "cabal-cache",
    
    3222
    +        "toolchain"
    
    3223
    +      ]
    
    3224
    +    },
    
    3225
    +    "dependencies": [],
    
    3226
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    3227
    +    "needs": [
    
    3228
    +      {
    
    3229
    +        "artifacts": false,
    
    3230
    +        "job": "hadrian-ghc-in-ghci"
    
    3231
    +      }
    
    3232
    +    ],
    
    3233
    +    "rules": [
    
    3234
    +      {
    
    3235
    +        "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)",
    
    3236
    +        "when": "on_success"
    
    3237
    +      }
    
    3238
    +    ],
    
    3239
    +    "script": [
    
    3240
    +      "sudo chown ghc:ghc -R .",
    
    3241
    +      ".gitlab/ci.sh setup",
    
    3242
    +      ".gitlab/ci.sh configure",
    
    3243
    +      ".gitlab/ci.sh build_hadrian",
    
    3244
    +      ".gitlab/ci.sh test_hadrian"
    
    3245
    +    ],
    
    3246
    +    "stage": "full-build",
    
    3247
    +    "tags": [
    
    3248
    +      "x86_64-linux"
    
    3249
    +    ],
    
    3250
    +    "variables": {
    
    3251
    +      "BIGNUM_BACKEND": "gmp",
    
    3252
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-validate+debug_info+ubsan",
    
    3253
    +      "BUILD_FLAVOUR": "validate+debug_info+ubsan",
    
    3254
    +      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3255
    +      "HADRIAN_ARGS": "--docs=none",
    
    3256
    +      "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    3257
    +      "RUNTEST_ARGS": "",
    
    3258
    +      "TEST_ENV": "x86_64-linux-fedora43-validate+debug_info+ubsan",
    
    3259
    +      "UBSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.ubsan-suppressions",
    
    3195 3260
           "XZ_OPT": "-9"
    
    3196 3261
         }
    
    3197 3262
       },
    
    ... ... @@ -4808,7 +4873,7 @@
    4808 4873
           "XZ_OPT": "-9"
    
    4809 4874
         }
    
    4810 4875
       },
    
    4811
    -  "release-x86_64-linux-fedora42-release": {
    
    4876
    +  "release-x86_64-linux-fedora43-release": {
    
    4812 4877
         "after_script": [
    
    4813 4878
           ".gitlab/ci.sh save_cache",
    
    4814 4879
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -4819,7 +4884,7 @@
    4819 4884
         "artifacts": {
    
    4820 4885
           "expire_in": "1 year",
    
    4821 4886
           "paths": [
    
    4822
    -        "ghc-x86_64-linux-fedora42-release.tar.xz",
    
    4887
    +        "ghc-x86_64-linux-fedora43-release.tar.xz",
    
    4823 4888
             "junit.xml",
    
    4824 4889
             "unexpected-test-output.tar.gz"
    
    4825 4890
           ],
    
    ... ... @@ -4829,14 +4894,14 @@
    4829 4894
           "when": "always"
    
    4830 4895
         },
    
    4831 4896
         "cache": {
    
    4832
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    4897
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    4833 4898
           "paths": [
    
    4834 4899
             "cabal-cache",
    
    4835 4900
             "toolchain"
    
    4836 4901
           ]
    
    4837 4902
         },
    
    4838 4903
         "dependencies": [],
    
    4839
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    4904
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    4840 4905
         "needs": [
    
    4841 4906
           {
    
    4842 4907
             "artifacts": false,
    
    ... ... @@ -4862,17 +4927,17 @@
    4862 4927
         ],
    
    4863 4928
         "variables": {
    
    4864 4929
           "BIGNUM_BACKEND": "gmp",
    
    4865
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
    
    4930
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release",
    
    4866 4931
           "BUILD_FLAVOUR": "release",
    
    4867 4932
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4868 4933
           "IGNORE_PERF_FAILURES": "all",
    
    4869 4934
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4870 4935
           "RUNTEST_ARGS": "",
    
    4871
    -      "TEST_ENV": "x86_64-linux-fedora42-release",
    
    4936
    +      "TEST_ENV": "x86_64-linux-fedora43-release",
    
    4872 4937
           "XZ_OPT": "-9"
    
    4873 4938
         }
    
    4874 4939
       },
    
    4875
    -  "release-x86_64-linux-fedora42-release+debug_info": {
    
    4940
    +  "release-x86_64-linux-fedora43-release+debug_info": {
    
    4876 4941
         "after_script": [
    
    4877 4942
           ".gitlab/ci.sh save_cache",
    
    4878 4943
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -4883,7 +4948,7 @@
    4883 4948
         "artifacts": {
    
    4884 4949
           "expire_in": "1 year",
    
    4885 4950
           "paths": [
    
    4886
    -        "ghc-x86_64-linux-fedora42-release+debug_info.tar.xz",
    
    4951
    +        "ghc-x86_64-linux-fedora43-release+debug_info.tar.xz",
    
    4887 4952
             "junit.xml",
    
    4888 4953
             "unexpected-test-output.tar.gz"
    
    4889 4954
           ],
    
    ... ... @@ -4893,14 +4958,14 @@
    4893 4958
           "when": "always"
    
    4894 4959
         },
    
    4895 4960
         "cache": {
    
    4896
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    4961
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    4897 4962
           "paths": [
    
    4898 4963
             "cabal-cache",
    
    4899 4964
             "toolchain"
    
    4900 4965
           ]
    
    4901 4966
         },
    
    4902 4967
         "dependencies": [],
    
    4903
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    4968
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    4904 4969
         "needs": [
    
    4905 4970
           {
    
    4906 4971
             "artifacts": false,
    
    ... ... @@ -4926,17 +4991,17 @@
    4926 4991
         ],
    
    4927 4992
         "variables": {
    
    4928 4993
           "BIGNUM_BACKEND": "gmp",
    
    4929
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release+debug_info",
    
    4994
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release+debug_info",
    
    4930 4995
           "BUILD_FLAVOUR": "release+debug_info",
    
    4931 4996
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4932 4997
           "IGNORE_PERF_FAILURES": "all",
    
    4933 4998
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4934 4999
           "RUNTEST_ARGS": "",
    
    4935
    -      "TEST_ENV": "x86_64-linux-fedora42-release+debug_info",
    
    5000
    +      "TEST_ENV": "x86_64-linux-fedora43-release+debug_info",
    
    4936 5001
           "XZ_OPT": "-9"
    
    4937 5002
         }
    
    4938 5003
       },
    
    4939
    -  "release-x86_64-linux-fedora42-release-hackage": {
    
    5004
    +  "release-x86_64-linux-fedora43-release-hackage": {
    
    4940 5005
         "after_script": [
    
    4941 5006
           ".gitlab/ci.sh save_cache",
    
    4942 5007
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -4947,7 +5012,7 @@
    4947 5012
         "artifacts": {
    
    4948 5013
           "expire_in": "1 year",
    
    4949 5014
           "paths": [
    
    4950
    -        "ghc-x86_64-linux-fedora42-release.tar.xz",
    
    5015
    +        "ghc-x86_64-linux-fedora43-release.tar.xz",
    
    4951 5016
             "junit.xml",
    
    4952 5017
             "unexpected-test-output.tar.gz"
    
    4953 5018
           ],
    
    ... ... @@ -4957,14 +5022,14 @@
    4957 5022
           "when": "always"
    
    4958 5023
         },
    
    4959 5024
         "cache": {
    
    4960
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    5025
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    4961 5026
           "paths": [
    
    4962 5027
             "cabal-cache",
    
    4963 5028
             "toolchain"
    
    4964 5029
           ]
    
    4965 5030
         },
    
    4966 5031
         "dependencies": [],
    
    4967
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    5032
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    4968 5033
         "needs": [
    
    4969 5034
           {
    
    4970 5035
             "artifacts": false,
    
    ... ... @@ -4990,14 +5055,14 @@
    4990 5055
         ],
    
    4991 5056
         "variables": {
    
    4992 5057
           "BIGNUM_BACKEND": "gmp",
    
    4993
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
    
    5058
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release",
    
    4994 5059
           "BUILD_FLAVOUR": "release",
    
    4995 5060
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4996 5061
           "HADRIAN_ARGS": "--haddock-for-hackage",
    
    4997 5062
           "IGNORE_PERF_FAILURES": "all",
    
    4998 5063
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    4999 5064
           "RUNTEST_ARGS": "",
    
    5000
    -      "TEST_ENV": "x86_64-linux-fedora42-release",
    
    5065
    +      "TEST_ENV": "x86_64-linux-fedora43-release",
    
    5001 5066
           "XZ_OPT": "-9"
    
    5002 5067
         }
    
    5003 5068
       },
    
    ... ... @@ -7032,7 +7097,7 @@
    7032 7097
           "TEST_ENV": "x86_64-linux-deb9-validate"
    
    7033 7098
         }
    
    7034 7099
       },
    
    7035
    -  "x86_64-linux-fedora42-release": {
    
    7100
    +  "x86_64-linux-fedora43-release": {
    
    7036 7101
         "after_script": [
    
    7037 7102
           ".gitlab/ci.sh save_cache",
    
    7038 7103
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -7043,7 +7108,7 @@
    7043 7108
         "artifacts": {
    
    7044 7109
           "expire_in": "2 weeks",
    
    7045 7110
           "paths": [
    
    7046
    -        "ghc-x86_64-linux-fedora42-release.tar.xz",
    
    7111
    +        "ghc-x86_64-linux-fedora43-release.tar.xz",
    
    7047 7112
             "junit.xml",
    
    7048 7113
             "unexpected-test-output.tar.gz"
    
    7049 7114
           ],
    
    ... ... @@ -7053,14 +7118,14 @@
    7053 7118
           "when": "always"
    
    7054 7119
         },
    
    7055 7120
         "cache": {
    
    7056
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    7121
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    7057 7122
           "paths": [
    
    7058 7123
             "cabal-cache",
    
    7059 7124
             "toolchain"
    
    7060 7125
           ]
    
    7061 7126
         },
    
    7062 7127
         "dependencies": [],
    
    7063
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    7128
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    7064 7129
         "needs": [
    
    7065 7130
           {
    
    7066 7131
             "artifacts": false,
    
    ... ... @@ -7069,7 +7134,7 @@
    7069 7134
         ],
    
    7070 7135
         "rules": [
    
    7071 7136
           {
    
    7072
    -        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-release(\\s|$).*/)) || (($ONLY_JOBS == null) && ((\"true\" == \"true\")))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7137
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora43-release(\\s|$).*/)) || (($ONLY_JOBS == null) && ((\"true\" == \"true\")))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7073 7138
             "when": "on_success"
    
    7074 7139
           }
    
    7075 7140
         ],
    
    ... ... @@ -7086,15 +7151,15 @@
    7086 7151
         ],
    
    7087 7152
         "variables": {
    
    7088 7153
           "BIGNUM_BACKEND": "gmp",
    
    7089
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
    
    7154
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release",
    
    7090 7155
           "BUILD_FLAVOUR": "release",
    
    7091 7156
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7092 7157
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7093 7158
           "RUNTEST_ARGS": "",
    
    7094
    -      "TEST_ENV": "x86_64-linux-fedora42-release"
    
    7159
    +      "TEST_ENV": "x86_64-linux-fedora43-release"
    
    7095 7160
         }
    
    7096 7161
       },
    
    7097
    -  "x86_64-linux-fedora42-release-hackage": {
    
    7162
    +  "x86_64-linux-fedora43-release-hackage": {
    
    7098 7163
         "after_script": [
    
    7099 7164
           ".gitlab/ci.sh save_cache",
    
    7100 7165
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -7105,7 +7170,7 @@
    7105 7170
         "artifacts": {
    
    7106 7171
           "expire_in": "2 weeks",
    
    7107 7172
           "paths": [
    
    7108
    -        "ghc-x86_64-linux-fedora42-release.tar.xz",
    
    7173
    +        "ghc-x86_64-linux-fedora43-release.tar.xz",
    
    7109 7174
             "junit.xml",
    
    7110 7175
             "unexpected-test-output.tar.gz"
    
    7111 7176
           ],
    
    ... ... @@ -7115,14 +7180,14 @@
    7115 7180
           "when": "always"
    
    7116 7181
         },
    
    7117 7182
         "cache": {
    
    7118
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    7183
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    7119 7184
           "paths": [
    
    7120 7185
             "cabal-cache",
    
    7121 7186
             "toolchain"
    
    7122 7187
           ]
    
    7123 7188
         },
    
    7124 7189
         "dependencies": [],
    
    7125
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    7190
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    7126 7191
         "needs": [
    
    7127 7192
           {
    
    7128 7193
             "artifacts": false,
    
    ... ... @@ -7131,7 +7196,7 @@
    7131 7196
         ],
    
    7132 7197
         "rules": [
    
    7133 7198
           {
    
    7134
    -        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-release(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7199
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora43-release(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7135 7200
             "when": "on_success"
    
    7136 7201
           }
    
    7137 7202
         ],
    
    ... ... @@ -7148,16 +7213,16 @@
    7148 7213
         ],
    
    7149 7214
         "variables": {
    
    7150 7215
           "BIGNUM_BACKEND": "gmp",
    
    7151
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-release",
    
    7216
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-release",
    
    7152 7217
           "BUILD_FLAVOUR": "release",
    
    7153 7218
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7154 7219
           "HADRIAN_ARGS": "--haddock-for-hackage",
    
    7155 7220
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7156 7221
           "RUNTEST_ARGS": "",
    
    7157
    -      "TEST_ENV": "x86_64-linux-fedora42-release"
    
    7222
    +      "TEST_ENV": "x86_64-linux-fedora43-release"
    
    7158 7223
         }
    
    7159 7224
       },
    
    7160
    -  "x86_64-linux-fedora42-validate": {
    
    7225
    +  "x86_64-linux-fedora43-validate": {
    
    7161 7226
         "after_script": [
    
    7162 7227
           ".gitlab/ci.sh save_cache",
    
    7163 7228
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -7168,7 +7233,7 @@
    7168 7233
         "artifacts": {
    
    7169 7234
           "expire_in": "2 weeks",
    
    7170 7235
           "paths": [
    
    7171
    -        "ghc-x86_64-linux-fedora42-validate.tar.xz",
    
    7236
    +        "ghc-x86_64-linux-fedora43-validate.tar.xz",
    
    7172 7237
             "junit.xml",
    
    7173 7238
             "unexpected-test-output.tar.gz"
    
    7174 7239
           ],
    
    ... ... @@ -7178,14 +7243,14 @@
    7178 7243
           "when": "always"
    
    7179 7244
         },
    
    7180 7245
         "cache": {
    
    7181
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    7246
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    7182 7247
           "paths": [
    
    7183 7248
             "cabal-cache",
    
    7184 7249
             "toolchain"
    
    7185 7250
           ]
    
    7186 7251
         },
    
    7187 7252
         "dependencies": [],
    
    7188
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    7253
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    7189 7254
         "needs": [
    
    7190 7255
           {
    
    7191 7256
             "artifacts": false,
    
    ... ... @@ -7194,7 +7259,7 @@
    7194 7259
         ],
    
    7195 7260
         "rules": [
    
    7196 7261
           {
    
    7197
    -        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7262
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora43-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7198 7263
             "when": "on_success"
    
    7199 7264
           }
    
    7200 7265
         ],
    
    ... ... @@ -7211,15 +7276,15 @@
    7211 7276
         ],
    
    7212 7277
         "variables": {
    
    7213 7278
           "BIGNUM_BACKEND": "gmp",
    
    7214
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate",
    
    7279
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-validate",
    
    7215 7280
           "BUILD_FLAVOUR": "validate",
    
    7216 7281
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7217 7282
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7218 7283
           "RUNTEST_ARGS": "",
    
    7219
    -      "TEST_ENV": "x86_64-linux-fedora42-validate"
    
    7284
    +      "TEST_ENV": "x86_64-linux-fedora43-validate"
    
    7220 7285
         }
    
    7221 7286
       },
    
    7222
    -  "x86_64-linux-fedora42-validate+debug_info": {
    
    7287
    +  "x86_64-linux-fedora43-validate+debug_info": {
    
    7223 7288
         "after_script": [
    
    7224 7289
           ".gitlab/ci.sh save_cache",
    
    7225 7290
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -7230,7 +7295,7 @@
    7230 7295
         "artifacts": {
    
    7231 7296
           "expire_in": "2 weeks",
    
    7232 7297
           "paths": [
    
    7233
    -        "ghc-x86_64-linux-fedora42-validate+debug_info.tar.xz",
    
    7298
    +        "ghc-x86_64-linux-fedora43-validate+debug_info.tar.xz",
    
    7234 7299
             "junit.xml",
    
    7235 7300
             "unexpected-test-output.tar.gz"
    
    7236 7301
           ],
    
    ... ... @@ -7240,14 +7305,14 @@
    7240 7305
           "when": "always"
    
    7241 7306
         },
    
    7242 7307
         "cache": {
    
    7243
    -      "key": "x86_64-linux-fedora42-$CACHE_REV",
    
    7308
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    7244 7309
           "paths": [
    
    7245 7310
             "cabal-cache",
    
    7246 7311
             "toolchain"
    
    7247 7312
           ]
    
    7248 7313
         },
    
    7249 7314
         "dependencies": [],
    
    7250
    -    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora42:$DOCKER_REV",
    
    7315
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    7251 7316
         "needs": [
    
    7252 7317
           {
    
    7253 7318
             "artifacts": false,
    
    ... ... @@ -7256,7 +7321,7 @@
    7256 7321
         ],
    
    7257 7322
         "rules": [
    
    7258 7323
           {
    
    7259
    -        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora42-validate\\+debug_info(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7324
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora43-validate\\+debug_info(\\s|$).*/)) || (($ONLY_JOBS == null) && (\"disabled\" != \"disabled\"))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7260 7325
             "when": "on_success"
    
    7261 7326
           }
    
    7262 7327
         ],
    
    ... ... @@ -7273,12 +7338,76 @@
    7273 7338
         ],
    
    7274 7339
         "variables": {
    
    7275 7340
           "BIGNUM_BACKEND": "gmp",
    
    7276
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora42-validate+debug_info",
    
    7341
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-validate+debug_info",
    
    7277 7342
           "BUILD_FLAVOUR": "validate+debug_info",
    
    7278 7343
           "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7279 7344
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7280 7345
           "RUNTEST_ARGS": "",
    
    7281
    -      "TEST_ENV": "x86_64-linux-fedora42-validate+debug_info"
    
    7346
    +      "TEST_ENV": "x86_64-linux-fedora43-validate+debug_info"
    
    7347
    +    }
    
    7348
    +  },
    
    7349
    +  "x86_64-linux-fedora43-validate+debug_info+ubsan": {
    
    7350
    +    "after_script": [
    
    7351
    +      ".gitlab/ci.sh save_cache",
    
    7352
    +      ".gitlab/ci.sh save_test_output",
    
    7353
    +      ".gitlab/ci.sh clean",
    
    7354
    +      "cat ci_timings.txt"
    
    7355
    +    ],
    
    7356
    +    "allow_failure": false,
    
    7357
    +    "artifacts": {
    
    7358
    +      "expire_in": "2 weeks",
    
    7359
    +      "paths": [
    
    7360
    +        "ghc-x86_64-linux-fedora43-validate+debug_info+ubsan.tar.xz",
    
    7361
    +        "junit.xml",
    
    7362
    +        "unexpected-test-output.tar.gz"
    
    7363
    +      ],
    
    7364
    +      "reports": {
    
    7365
    +        "junit": "junit.xml"
    
    7366
    +      },
    
    7367
    +      "when": "always"
    
    7368
    +    },
    
    7369
    +    "cache": {
    
    7370
    +      "key": "x86_64-linux-fedora43-$CACHE_REV",
    
    7371
    +      "paths": [
    
    7372
    +        "cabal-cache",
    
    7373
    +        "toolchain"
    
    7374
    +      ]
    
    7375
    +    },
    
    7376
    +    "dependencies": [],
    
    7377
    +    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV",
    
    7378
    +    "needs": [
    
    7379
    +      {
    
    7380
    +        "artifacts": false,
    
    7381
    +        "job": "hadrian-ghc-in-ghci"
    
    7382
    +      }
    
    7383
    +    ],
    
    7384
    +    "rules": [
    
    7385
    +      {
    
    7386
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-fedora43-validate\\+debug_info\\+ubsan(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    7387
    +        "when": "on_success"
    
    7388
    +      }
    
    7389
    +    ],
    
    7390
    +    "script": [
    
    7391
    +      "sudo chown ghc:ghc -R .",
    
    7392
    +      ".gitlab/ci.sh setup",
    
    7393
    +      ".gitlab/ci.sh configure",
    
    7394
    +      ".gitlab/ci.sh build_hadrian",
    
    7395
    +      ".gitlab/ci.sh test_hadrian"
    
    7396
    +    ],
    
    7397
    +    "stage": "full-build",
    
    7398
    +    "tags": [
    
    7399
    +      "x86_64-linux"
    
    7400
    +    ],
    
    7401
    +    "variables": {
    
    7402
    +      "BIGNUM_BACKEND": "gmp",
    
    7403
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-fedora43-validate+debug_info+ubsan",
    
    7404
    +      "BUILD_FLAVOUR": "validate+debug_info+ubsan",
    
    7405
    +      "CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7406
    +      "HADRIAN_ARGS": "--docs=none",
    
    7407
    +      "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    7408
    +      "RUNTEST_ARGS": "",
    
    7409
    +      "TEST_ENV": "x86_64-linux-fedora43-validate+debug_info+ubsan",
    
    7410
    +      "UBSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.ubsan-suppressions"
    
    7282 7411
         }
    
    7283 7412
       },
    
    7284 7413
       "x86_64-linux-rocky8-validate": {
    

  • .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
    ... ... @@ -23,8 +23,8 @@ def job_triple(job_name):
    23 23
             'release-x86_64-linux-ubuntu22_04-release': 'x86_64-ubuntu22_04-linux',
    
    24 24
             'release-x86_64-linux-ubuntu20_04-release': 'x86_64-ubuntu20_04-linux',
    
    25 25
             'release-x86_64-linux-ubuntu18_04-release': 'x86_64-ubuntu18_04-linux',
    
    26
    -        'release-x86_64-linux-fedora42-release': 'x86_64-fedora42-linux',
    
    27
    -        'release-x86_64-linux-fedora42-release+debug_info': 'x86_64-fedora42-linux-dwarf',
    
    26
    +        'release-x86_64-linux-fedora43-release': 'x86_64-fedora43-linux',
    
    27
    +        'release-x86_64-linux-fedora43-release+debug_info': 'x86_64-fedora43-linux-dwarf',
    
    28 28
             'release-x86_64-linux-deb12-release': 'x86_64-deb12-linux',
    
    29 29
             'release-x86_64-linux-deb11-release': 'x86_64-deb11-linux',
    
    30 30
             'release-x86_64-linux-deb10-release+debug_info': 'x86_64-deb10-linux-dwarf',
    

  • .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
    ... ... @@ -200,7 +200,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
    200 200
         ubuntu2204 = mk(ubuntu("22_04"))
    
    201 201
         ubuntu2404 = mk(ubuntu("24_04"))
    
    202 202
         rocky8 = mk(rocky("8"))
    
    203
    -    fedora42 = mk(fedora(42))
    
    203
    +    fedora43 = mk(fedora(43))
    
    204 204
         darwin_x86 = mk(darwin("x86_64"))
    
    205 205
         darwin_arm64 = mk(darwin("aarch64"))
    
    206 206
         windows = mk(windowsArtifact)
    
    ... ... @@ -239,7 +239,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
    239 239
                                  , "unknown_versioning": ubuntu2004 }
    
    240 240
               , "Linux_CentOS"  : { "( >= 8 && < 9 )" : rocky8
    
    241 241
                                   , "unknown_versioning" : rocky8  }
    
    242
    -          , "Linux_Fedora"  : { ">= 42": fedora42
    
    242
    +          , "Linux_Fedora"  : { ">= 43": fedora43
    
    243 243
                                   , "unknown_versioning": rocky8 }
    
    244 244
               , "Linux_RedHat"  : { "unknown_versioning": rocky8 }
    
    245 245
               , "Linux_UnknownLinux" : { "unknown_versioning": rocky8 }
    

  • configure.ac
    ... ... @@ -526,7 +526,7 @@ AC_SUBST(InstallNameToolCmd)
    526 526
     # versions of LLVM simultaneously, but that stopped working around
    
    527 527
     # 3.5/3.6 release of LLVM.
    
    528 528
     LlvmMinVersion=13  # inclusive
    
    529
    -LlvmMaxVersion=21  # not inclusive
    
    529
    +LlvmMaxVersion=22  # not inclusive
    
    530 530
     AC_SUBST([LlvmMinVersion])
    
    531 531
     AC_SUBST([LlvmMaxVersion])
    
    532 532
     
    

  • hadrian/doc/flavours.md
    ... ... @@ -238,6 +238,10 @@ The supported transformers are listed below:
    238 238
             <td><code>thread_sanitizer</code></td>
    
    239 239
             <td>Build the runtime system with ThreadSanitizer support</td>
    
    240 240
         </tr>
    
    241
    +    <tr>
    
    242
    +        <td><code>ubsan</code></td>
    
    243
    +        <td>Build all stage1+ C/C++ code with UndefinedBehaviorSanitizer support</td>
    
    244
    +    </tr>
    
    241 245
         <tr>
    
    242 246
             <td><code>llvm</code></td>
    
    243 247
             <td>Use GHC's LLVM backend (`-fllvm`) for all stage1+ compilation.</td>
    

  • hadrian/src/Flavour.hs
    ... ... @@ -7,6 +7,7 @@ module Flavour
    7 7
       , addArgs
    
    8 8
       , splitSections
    
    9 9
       , enableThreadSanitizer
    
    10
    +  , enableUBSan
    
    10 11
       , enableLateCCS
    
    11 12
       , enableHashUnitIds
    
    12 13
       , enableDebugInfo, enableTickyGhc
    
    ... ... @@ -33,6 +34,9 @@ import Data.Either
    33 34
     import Data.Map (Map)
    
    34 35
     import qualified Data.Map as M
    
    35 36
     import qualified Data.Set as Set
    
    37
    +import GHC.Platform.ArchOS
    
    38
    +import Oracles.Flag
    
    39
    +import Oracles.Setting
    
    36 40
     import Packages
    
    37 41
     import Flavour.Type
    
    38 42
     import Settings.Parser
    
    ... ... @@ -53,6 +57,7 @@ flavourTransformers = M.fromList
    53 57
         , "no_split_sections" =: noSplitSections
    
    54 58
         , "thread_sanitizer" =: enableThreadSanitizer False
    
    55 59
         , "thread_sanitizer_cmm" =: enableThreadSanitizer True
    
    60
    +    , "ubsan"            =: enableUBSan
    
    56 61
         , "llvm"             =: viaLlvmBackend
    
    57 62
         , "profiled_ghc"     =: enableProfiledGhc
    
    58 63
         , "no_dynamic_ghc"   =: disableDynamicGhcPrograms
    
    ... ... @@ -258,6 +263,51 @@ enableThreadSanitizer instrumentCmm = addArgs $ notStage0 ? mconcat
    258 263
             ]
    
    259 264
         ]
    
    260 265
     
    
    266
    +-- | Whether or not -shared-libsan should be passed to clang at
    
    267
    +-- link-time.
    
    268
    +--
    
    269
    +-- See
    
    270
    +-- https://github.com/llvm/llvm-project/blob/llvmorg-21.1.6/clang/lib/Driver/SanitizerArgs.cpp#L1008,
    
    271
    +-- clang defaults to -shared-libsan on darwin/windows and
    
    272
    +-- -static-libsan on linux. In general, -static-libsan is incredibly
    
    273
    +-- problematic when multiple copies of the sanitizer runtimes coexist
    
    274
    +-- in the same address space due to being linked into multiple Haskell
    
    275
    +-- libraries. So we should explicitly specify `-shared-libsan` if
    
    276
    +-- needed.
    
    277
    +--
    
    278
    +-- A small downside of -shared-libsan is the clang-specific sanitizer
    
    279
    +-- runtime shared library path needs to be manually specified via
    
    280
    +-- @export LD_LIBRARY_PATH=$(dirname $(clang -print-libgcc-file-name
    
    281
    +-- -rtlib=compiler-rt))@ for ld.so to find it at runtime.
    
    282
    +needSharedLibSAN :: Action Bool
    
    283
    +needSharedLibSAN = do
    
    284
    +  is_clang <- flag CcLlvmBackend
    
    285
    +  is_default_shared_libsan <- anyTargetOs [OSDarwin, OSMinGW32]
    
    286
    +  pure $ is_clang && not is_default_shared_libsan
    
    287
    +
    
    288
    +-- | Build all stage1+ C/C++ code with UndefinedBehaviorSanitizer
    
    289
    +-- support:
    
    290
    +-- https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
    
    291
    +enableUBSan :: Flavour -> Flavour
    
    292
    +enableUBSan =
    
    293
    +  addArgs $
    
    294
    +    notStage0
    
    295
    +      ? mconcat
    
    296
    +        [ package rts
    
    297
    +            ? builder (Cabal Flags)
    
    298
    +            ? arg "+ubsan"
    
    299
    +            <> (needSharedLibSAN ? arg "+shared-libsan"),
    
    300
    +          builder (Ghc CompileHs) ? arg "-optc-fsanitize=undefined",
    
    301
    +          builder (Ghc CompileCWithGhc) ? arg "-optc-fsanitize=undefined",
    
    302
    +          builder (Ghc CompileCppWithGhc) ? arg "-optcxx-fsanitize=undefined",
    
    303
    +          builder (Ghc LinkHs)
    
    304
    +            ? arg "-optc-fsanitize=undefined"
    
    305
    +            <> arg "-optl-fsanitize=undefined"
    
    306
    +            <> (needSharedLibSAN ? arg "-optl-shared-libsan"),
    
    307
    +          builder (Cc CompileC) ? arg "-fsanitize=undefined",
    
    308
    +          builder Testsuite ? arg "--config=have_ubsan=True"
    
    309
    +        ]
    
    310
    +
    
    261 311
     -- | Use the LLVM backend in stages 1 and later.
    
    262 312
     viaLlvmBackend :: Flavour -> Flavour
    
    263 313
     viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"
    

  • rts/.ubsan-suppressions
    1
    +# libraries/text/cbits/measure_off.c:50:39: runtime left shift of 1 by 31 places cannot be represented in type 'int'
    
    2
    +shift-base:libraries/text/cbits/measure_off.c
    
    3
    +
    
    4
    +# "runtime call to function foo through pointer to incorrect function
    
    5
    +# type" is unfortunately pretty common (e.g. evac_fn in rts) and
    
    6
    +# impact the signal to noise ratio of UBSan warnings. gcc doesn't
    
    7
    +# implement this instrumentation though.
    
    8
    +function:*

  • rts/Interpreter.c
    ... ... @@ -274,12 +274,21 @@ See also Note [Width of parameters] for some more motivation.
    274 274
     
    
    275 275
     #define W64_TO_WDS(n) ((n * sizeof(StgWord64) / sizeof(StgWord)))
    
    276 276
     
    
    277
    +// Returns a pointer to the stack location.
    
    278
    +#define SafeSpWP(n)      \
    
    279
    +  ( ((WITHIN_CAP_CHUNK_BOUNDS_W(n)) ? Sp_plusW(n) : slow_spw(Sp, cap->r.rCurrentTSO->stackobj, n)))
    
    280
    +#define SafeSpBP(off_w)      \
    
    281
    +  ( (WITHIN_CAP_CHUNK_BOUNDS_W((1+(off_w))/sizeof(StgWord))) ? \
    
    282
    +        Sp_plusB(off_w) : \
    
    283
    +        (void*)((ptrdiff_t)((ptrdiff_t)(off_w) % (ptrdiff_t)sizeof(StgWord)) + (StgWord8*)slow_spw(Sp, cap->r.rCurrentTSO->stackobj, (off_w)/sizeof(StgWord))) \
    
    284
    +    )
    
    285
    +
    
    277 286
     // Always safe to use - Return the value at the address
    
    278 287
     #define ReadSpW(n)       (*((StgWord*)   SafeSpWP(n)))
    
    279 288
     //Argument is offset in multiples of word64
    
    280 289
     #define ReadSpW64(n)     (*((StgWord64*) SafeSpWP(W64_TO_WDS(n))))
    
    281 290
     // Perhaps confusingly this still reads a full word, merely the offset is in bytes.
    
    282
    -#define ReadSpB(n)       (*((StgWord*)   SafeSpBP(n)))
    
    291
    +#define ReadSpB(n)       (*((StgUnalignedWord*)   SafeSpBP(n)))
    
    283 292
     
    
    284 293
     /* Note [PUSH_L underflow]
    
    285 294
        ~~~~~~~~~~~~~~~~~~~~~~~
    
    ... ... @@ -326,15 +335,6 @@ See ticket #25750
    326 335
     
    
    327 336
     */
    
    328 337
     
    
    329
    -// Returns a pointer to the stack location.
    
    330
    -#define SafeSpWP(n)      \
    
    331
    -  ( ((WITHIN_CAP_CHUNK_BOUNDS_W(n)) ? Sp_plusW(n) : slow_spw(Sp, cap->r.rCurrentTSO->stackobj, n)))
    
    332
    -#define SafeSpBP(off_w)      \
    
    333
    -  ( (WITHIN_CAP_CHUNK_BOUNDS_W((1+(off_w))/sizeof(StgWord))) ? \
    
    334
    -        Sp_plusB(off_w) : \
    
    335
    -        (void*)((ptrdiff_t)((ptrdiff_t)(off_w) % (ptrdiff_t)sizeof(StgWord)) + (StgWord8*)slow_spw(Sp, cap->r.rCurrentTSO->stackobj, (off_w)/sizeof(StgWord))) \
    
    336
    -    )
    
    337
    -
    
    338 338
     
    
    339 339
     
    
    340 340
     /* Note [Interpreter subword primops]
    
    ... ... @@ -2904,6 +2904,8 @@ run_BCO:
    2904 2904
             NEXT_INSTRUCTION;                                              \
    
    2905 2905
         }
    
    2906 2906
     
    
    2907
    +#define TYPE_IS_SIGNED(ty) ((ty)-1 < (ty)1)
    
    2908
    +
    
    2907 2909
     // op :: ty -> ty -> ty
    
    2908 2910
     #define SIZED_BIN_OP(op,ty)                                                     \
    
    2909 2911
             {                                                                       \
    
    ... ... @@ -2911,8 +2913,12 @@ run_BCO:
    2911 2913
                     ty r = ((ty) ReadSpW64(0)) op ((ty) ReadSpW64(1));                  \
    
    2912 2914
                     Sp_addW64(1);                                                   \
    
    2913 2915
                     SpW64(0) = (StgWord64) r;                                       \
    
    2916
    +            } else if (TYPE_IS_SIGNED(ty)) {                                    \
    
    2917
    +                ty r = ((StgInt)(ty)ReadSpW(0)) op ((StgInt)(ty)ReadSpW(1));    \
    
    2918
    +                Sp_addW(1);                                                     \
    
    2919
    +                SpW(0) = (StgWord) r;                                           \
    
    2914 2920
                 } else {                                                            \
    
    2915
    -                ty r = ((ty) ReadSpW(0)) op ((ty) ReadSpW(1));                  \
    
    2921
    +                ty r = ((StgWord)(ty)ReadSpW(0)) op ((StgWord)(ty)ReadSpW(1));  \
    
    2916 2922
                     Sp_addW(1);                                                     \
    
    2917 2923
                     SpW(0) = (StgWord) r;                                           \
    
    2918 2924
                 };                                                                  \
    
    ... ... @@ -2949,12 +2955,12 @@ run_BCO:
    2949 2955
         NEXT_INSTRUCTION;                                                      \
    
    2950 2956
     }
    
    2951 2957
     
    
    2952
    -        INSTRUCTION(bci_OP_ADD_64): SIZED_BIN_OP(+, StgInt64)
    
    2953
    -        INSTRUCTION(bci_OP_SUB_64): SIZED_BIN_OP(-, StgInt64)
    
    2954
    -        INSTRUCTION(bci_OP_AND_64): SIZED_BIN_OP(&, StgInt64)
    
    2955
    -        INSTRUCTION(bci_OP_XOR_64): SIZED_BIN_OP(^, StgInt64)
    
    2956
    -        INSTRUCTION(bci_OP_OR_64):  SIZED_BIN_OP(|, StgInt64)
    
    2957
    -        INSTRUCTION(bci_OP_MUL_64): SIZED_BIN_OP(*, StgInt64)
    
    2958
    +        INSTRUCTION(bci_OP_ADD_64): SIZED_BIN_OP(+, StgWord64)
    
    2959
    +        INSTRUCTION(bci_OP_SUB_64): SIZED_BIN_OP(-, StgWord64)
    
    2960
    +        INSTRUCTION(bci_OP_AND_64): SIZED_BIN_OP(&, StgWord64)
    
    2961
    +        INSTRUCTION(bci_OP_XOR_64): SIZED_BIN_OP(^, StgWord64)
    
    2962
    +        INSTRUCTION(bci_OP_OR_64):  SIZED_BIN_OP(|, StgWord64)
    
    2963
    +        INSTRUCTION(bci_OP_MUL_64): SIZED_BIN_OP(*, StgWord64)
    
    2958 2964
             INSTRUCTION(bci_OP_SHL_64): SIZED_BIN_OP_TY_INT(<<, StgWord64)
    
    2959 2965
             INSTRUCTION(bci_OP_LSR_64): SIZED_BIN_OP_TY_INT(>>, StgWord64)
    
    2960 2966
             INSTRUCTION(bci_OP_ASR_64): SIZED_BIN_OP_TY_INT(>>, StgInt64)
    
    ... ... @@ -2972,15 +2978,15 @@ run_BCO:
    2972 2978
             INSTRUCTION(bci_OP_S_LE_64): SIZED_BIN_OP_TY_TY_INT(<=, StgInt64)
    
    2973 2979
     
    
    2974 2980
             INSTRUCTION(bci_OP_NOT_64): UN_SIZED_OP(~, StgWord64)
    
    2975
    -        INSTRUCTION(bci_OP_NEG_64): UN_SIZED_OP(-, StgInt64)
    
    2981
    +        INSTRUCTION(bci_OP_NEG_64): UN_SIZED_OP(-, StgWord64)
    
    2976 2982
     
    
    2977 2983
     
    
    2978
    -        INSTRUCTION(bci_OP_ADD_32): SIZED_BIN_OP(+, StgInt32)
    
    2979
    -        INSTRUCTION(bci_OP_SUB_32): SIZED_BIN_OP(-, StgInt32)
    
    2980
    -        INSTRUCTION(bci_OP_AND_32): SIZED_BIN_OP(&, StgInt32)
    
    2981
    -        INSTRUCTION(bci_OP_XOR_32): SIZED_BIN_OP(^, StgInt32)
    
    2982
    -        INSTRUCTION(bci_OP_OR_32):  SIZED_BIN_OP(|, StgInt32)
    
    2983
    -        INSTRUCTION(bci_OP_MUL_32): SIZED_BIN_OP(*, StgInt32)
    
    2984
    +        INSTRUCTION(bci_OP_ADD_32): SIZED_BIN_OP(+, StgWord32)
    
    2985
    +        INSTRUCTION(bci_OP_SUB_32): SIZED_BIN_OP(-, StgWord32)
    
    2986
    +        INSTRUCTION(bci_OP_AND_32): SIZED_BIN_OP(&, StgWord32)
    
    2987
    +        INSTRUCTION(bci_OP_XOR_32): SIZED_BIN_OP(^, StgWord32)
    
    2988
    +        INSTRUCTION(bci_OP_OR_32):  SIZED_BIN_OP(|, StgWord32)
    
    2989
    +        INSTRUCTION(bci_OP_MUL_32): SIZED_BIN_OP(*, StgWord32)
    
    2984 2990
             INSTRUCTION(bci_OP_SHL_32): SIZED_BIN_OP_TY_INT(<<, StgWord32)
    
    2985 2991
             INSTRUCTION(bci_OP_LSR_32): SIZED_BIN_OP_TY_INT(>>, StgWord32)
    
    2986 2992
             INSTRUCTION(bci_OP_ASR_32): SIZED_BIN_OP_TY_INT(>>, StgInt32)
    
    ... ... @@ -2998,15 +3004,15 @@ run_BCO:
    2998 3004
             INSTRUCTION(bci_OP_S_LE_32): SIZED_BIN_OP_TY_TY_INT(<=, StgInt32)
    
    2999 3005
     
    
    3000 3006
             INSTRUCTION(bci_OP_NOT_32): UN_SIZED_OP(~, StgWord32)
    
    3001
    -        INSTRUCTION(bci_OP_NEG_32): UN_SIZED_OP(-, StgInt32)
    
    3007
    +        INSTRUCTION(bci_OP_NEG_32): UN_SIZED_OP(-, StgWord32)
    
    3002 3008
     
    
    3003 3009
     
    
    3004
    -        INSTRUCTION(bci_OP_ADD_16): SIZED_BIN_OP(+, StgInt16)
    
    3005
    -        INSTRUCTION(bci_OP_SUB_16): SIZED_BIN_OP(-, StgInt16)
    
    3006
    -        INSTRUCTION(bci_OP_AND_16): SIZED_BIN_OP(&, StgInt16)
    
    3007
    -        INSTRUCTION(bci_OP_XOR_16): SIZED_BIN_OP(^, StgInt16)
    
    3008
    -        INSTRUCTION(bci_OP_OR_16):  SIZED_BIN_OP(|, StgInt16)
    
    3009
    -        INSTRUCTION(bci_OP_MUL_16): SIZED_BIN_OP(*, StgInt16)
    
    3010
    +        INSTRUCTION(bci_OP_ADD_16): SIZED_BIN_OP(+, StgWord16)
    
    3011
    +        INSTRUCTION(bci_OP_SUB_16): SIZED_BIN_OP(-, StgWord16)
    
    3012
    +        INSTRUCTION(bci_OP_AND_16): SIZED_BIN_OP(&, StgWord16)
    
    3013
    +        INSTRUCTION(bci_OP_XOR_16): SIZED_BIN_OP(^, StgWord16)
    
    3014
    +        INSTRUCTION(bci_OP_OR_16):  SIZED_BIN_OP(|, StgWord16)
    
    3015
    +        INSTRUCTION(bci_OP_MUL_16): SIZED_BIN_OP(*, StgWord16)
    
    3010 3016
             INSTRUCTION(bci_OP_SHL_16): SIZED_BIN_OP_TY_INT(<<, StgWord16)
    
    3011 3017
             INSTRUCTION(bci_OP_LSR_16): SIZED_BIN_OP_TY_INT(>>, StgWord16)
    
    3012 3018
             INSTRUCTION(bci_OP_ASR_16): SIZED_BIN_OP_TY_INT(>>, StgInt16)
    
    ... ... @@ -3024,15 +3030,15 @@ run_BCO:
    3024 3030
             INSTRUCTION(bci_OP_S_LE_16): SIZED_BIN_OP(<=, StgInt16)
    
    3025 3031
     
    
    3026 3032
             INSTRUCTION(bci_OP_NOT_16): UN_SIZED_OP(~, StgWord16)
    
    3027
    -        INSTRUCTION(bci_OP_NEG_16): UN_SIZED_OP(-, StgInt16)
    
    3033
    +        INSTRUCTION(bci_OP_NEG_16): UN_SIZED_OP(-, StgWord16)
    
    3028 3034
     
    
    3029 3035
     
    
    3030
    -        INSTRUCTION(bci_OP_ADD_08): SIZED_BIN_OP(+, StgInt8)
    
    3031
    -        INSTRUCTION(bci_OP_SUB_08): SIZED_BIN_OP(-, StgInt8)
    
    3032
    -        INSTRUCTION(bci_OP_AND_08): SIZED_BIN_OP(&, StgInt8)
    
    3033
    -        INSTRUCTION(bci_OP_XOR_08): SIZED_BIN_OP(^, StgInt8)
    
    3034
    -        INSTRUCTION(bci_OP_OR_08):  SIZED_BIN_OP(|, StgInt8)
    
    3035
    -        INSTRUCTION(bci_OP_MUL_08): SIZED_BIN_OP(*, StgInt8)
    
    3036
    +        INSTRUCTION(bci_OP_ADD_08): SIZED_BIN_OP(+, StgWord8)
    
    3037
    +        INSTRUCTION(bci_OP_SUB_08): SIZED_BIN_OP(-, StgWord8)
    
    3038
    +        INSTRUCTION(bci_OP_AND_08): SIZED_BIN_OP(&, StgWord8)
    
    3039
    +        INSTRUCTION(bci_OP_XOR_08): SIZED_BIN_OP(^, StgWord8)
    
    3040
    +        INSTRUCTION(bci_OP_OR_08):  SIZED_BIN_OP(|, StgWord8)
    
    3041
    +        INSTRUCTION(bci_OP_MUL_08): SIZED_BIN_OP(*, StgWord8)
    
    3036 3042
             INSTRUCTION(bci_OP_SHL_08): SIZED_BIN_OP_TY_INT(<<, StgWord8)
    
    3037 3043
             INSTRUCTION(bci_OP_LSR_08): SIZED_BIN_OP_TY_INT(>>, StgWord8)
    
    3038 3044
             INSTRUCTION(bci_OP_ASR_08): SIZED_BIN_OP_TY_INT(>>, StgInt8)
    
    ... ... @@ -3050,7 +3056,7 @@ run_BCO:
    3050 3056
             INSTRUCTION(bci_OP_S_LE_08): SIZED_BIN_OP_TY_TY_INT(<=, StgInt8)
    
    3051 3057
     
    
    3052 3058
             INSTRUCTION(bci_OP_NOT_08): UN_SIZED_OP(~, StgWord8)
    
    3053
    -        INSTRUCTION(bci_OP_NEG_08): UN_SIZED_OP(-, StgInt8)
    
    3059
    +        INSTRUCTION(bci_OP_NEG_08): UN_SIZED_OP(-, StgWord8)
    
    3054 3060
     
    
    3055 3061
             INSTRUCTION(bci_OP_INDEX_ADDR_64):
    
    3056 3062
             {
    
    ... ... @@ -3130,7 +3136,7 @@ run_BCO:
    3130 3136
                 StgPtr p;
    
    3131 3137
                 W_ ret[2];                  // max needed
    
    3132 3138
                 W_ *arguments[stk_offset];  // max needed
    
    3133
    -            void *argptrs[nargs];
    
    3139
    +            void *argptrs[nargs > 0 ? nargs : 1]; // the size of a variable length array must be positive
    
    3134 3140
                 void (*fn)(void);
    
    3135 3141
     
    
    3136 3142
                 if (cif->rtype == &ffi_type_void) {
    

  • rts/include/stg/Types.h
    ... ... @@ -147,6 +147,8 @@ typedef uint16_t StgHalfWord;
    147 147
     #error GHC untested on this architecture: sizeof(void *) != 4 or 8
    
    148 148
     #endif
    
    149 149
     
    
    150
    +typedef StgWord StgUnalignedWord __attribute__((aligned(1)));
    
    151
    +
    
    150 152
     #define W_MASK  (sizeof(W_)-1)
    
    151 153
     
    
    152 154
     /*
    

  • rts/rts.cabal
    ... ... @@ -91,6 +91,19 @@ flag thread-sanitizer
    91 91
         in @rts/include/rts/TSANUtils.h@.
    
    92 92
       default: False
    
    93 93
       manual: True
    
    94
    +flag ubsan
    
    95
    +  description:
    
    96
    +    Link with -fsanitize=undefined, to be enabled when building with
    
    97
    +    UndefinedBehaviorSanitizer.
    
    98
    +  default: False
    
    99
    +  manual: True
    
    100
    +flag shared-libsan
    
    101
    +  description:
    
    102
    +    Link with -shared-libsan, to guarantee only one copy of the
    
    103
    +    sanitizer runtimes exist in the address space. See
    
    104
    +    needSharedLibSAN in hadrian/src/Flavour.hs.
    
    105
    +  default: False
    
    106
    +  manual: True
    
    94 107
     
    
    95 108
     library
    
    96 109
         -- rts is a wired in package and
    
    ... ... @@ -200,6 +213,12 @@ library
    200 213
             cc-options: -fsanitize=thread
    
    201 214
             ld-options: -fsanitize=thread
    
    202 215
     
    
    216
    +      if flag(ubsan)
    
    217
    +        ld-options: -fsanitize=undefined
    
    218
    +
    
    219
    +      if flag(shared-libsan)
    
    220
    +        ld-options: -shared-libsan
    
    221
    +
    
    203 222
           if os(linux)
    
    204 223
              -- the RTS depends upon libc. while this dependency is generally
    
    205 224
              -- implicitly added by `cc`, we must explicitly add it here to ensure
    

  • testsuite/driver/testglobals.py
    ... ... @@ -186,6 +186,9 @@ class TestConfig:
    186 186
             # Are we running in a ThreadSanitizer-instrumented build?
    
    187 187
             self.have_thread_sanitizer = False
    
    188 188
     
    
    189
    +        # Are we running with UndefinedBehaviorSanitizer enabled?
    
    190
    +        self.have_ubsan = False
    
    191
    +
    
    189 192
             # Do symbols use leading underscores?
    
    190 193
             self.leading_underscore = False
    
    191 194
     
    

  • testsuite/driver/testlib.py
    ... ... @@ -1090,6 +1090,8 @@ def llvm_build ( ) -> bool:
    1090 1090
     def have_thread_sanitizer( ) -> bool:
    
    1091 1091
         return config.have_thread_sanitizer
    
    1092 1092
     
    
    1093
    +def have_ubsan( ) -> bool:
    
    1094
    +    return config.have_ubsan
    
    1093 1095
     
    
    1094 1096
     def gcc_as_cmmp() -> bool:
    
    1095 1097
         return config.cmm_cpp_is_gcc