Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
-
18d68a70
by ARATA Mizuki at 2025-10-08T00:46:36-04:00
-
0bb9836d
by Ben Gamari at 2025-10-08T00:46:38-04:00
-
5a4a02d6
by Ben Gamari at 2025-10-08T00:46:39-04:00
-
cf643449
by Sven Tennie at 2025-10-08T00:46:39-04:00
-
b6bbcd37
by Julian Ospald at 2025-10-08T00:46:45-04:00
6 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- hadrian/src/Settings/Default.hs
- rts/posix/OSMem.c
- testsuite/tests/llvm/should_run/all.T
- utils/ghc-toolchain/src/GHC/Toolchain/Tools/MergeObjs.hs
Changes:
| ... | ... | @@ -489,7 +489,6 @@ alpineVariables arch = mconcat $ |
| 489 | 489 | [ mconcat [ brokenTest test "#25498" | test <- ["simd009", "T25169"] ]
|
| 490 | 490 | | I386 <- [arch]
|
| 491 | 491 | ] ++
|
| 492 | - [ brokenTest "T22033" "#25497" | I386 <- [arch] ] ++
|
|
| 493 | 492 | [ -- Bootstrap compiler has incorrectly configured target triple #25200
|
| 494 | 493 | "CONFIGURE_ARGS" =: "--enable-ignore-build-platform-mismatch --build=aarch64-unknown-linux --host=aarch64-unknown-linux --target=aarch64-unknown-linux"
|
| 495 | 494 | | AArch64 <- [arch]
|
| ... | ... | @@ -532,7 +532,7 @@ |
| 532 | 532 | "variables": {
|
| 533 | 533 | "BIGNUM_BACKEND": "gmp",
|
| 534 | 534 | "BIN_DIST_NAME": "ghc-i386-linux-alpine3_22-validate",
|
| 535 | - "BROKEN_TESTS": "encoding004 T10458 simd009 T25169 T22033",
|
|
| 535 | + "BROKEN_TESTS": "encoding004 T10458 simd009 T25169",
|
|
| 536 | 536 | "BUILD_FLAVOUR": "validate",
|
| 537 | 537 | "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
|
| 538 | 538 | "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
|
| ... | ... | @@ -1203,7 +1203,7 @@ |
| 1203 | 1203 | "variables": {
|
| 1204 | 1204 | "BIGNUM_BACKEND": "gmp",
|
| 1205 | 1205 | "BIN_DIST_NAME": "ghc-i386-linux-alpine3_22-validate",
|
| 1206 | - "BROKEN_TESTS": "encoding004 T10458 simd009 T25169 T22033",
|
|
| 1206 | + "BROKEN_TESTS": "encoding004 T10458 simd009 T25169",
|
|
| 1207 | 1207 | "BUILD_FLAVOUR": "validate",
|
| 1208 | 1208 | "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
|
| 1209 | 1209 | "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
|
| ... | ... | @@ -4017,7 +4017,7 @@ |
| 4017 | 4017 | "variables": {
|
| 4018 | 4018 | "BIGNUM_BACKEND": "gmp",
|
| 4019 | 4019 | "BIN_DIST_NAME": "ghc-i386-linux-alpine3_22-release+no_split_sections",
|
| 4020 | - "BROKEN_TESTS": "encoding004 T10458 simd009 T25169 T22033",
|
|
| 4020 | + "BROKEN_TESTS": "encoding004 T10458 simd009 T25169",
|
|
| 4021 | 4021 | "BUILD_FLAVOUR": "release+no_split_sections",
|
| 4022 | 4022 | "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
|
| 4023 | 4023 | "IGNORE_PERF_FAILURES": "all",
|
| ... | ... | @@ -80,7 +80,6 @@ stageBootPackages = return |
| 80 | 80 | stage0Packages :: Action [Package]
|
| 81 | 81 | stage0Packages = do
|
| 82 | 82 | cross <- flag CrossCompiling
|
| 83 | - haveCurses <- any (/= "") <$> traverse setting [ CursesIncludeDir, CursesLibDir ]
|
|
| 84 | 83 | return $ [ cabalSyntax
|
| 85 | 84 | , cabal
|
| 86 | 85 | , compiler
|
| ... | ... | @@ -116,7 +115,11 @@ stage0Packages = do |
| 116 | 115 | -- that confused Hadrian, so we must make those a stage0 package as well.
|
| 117 | 116 | -- Once we drop `Win32`/`unix` it should be possible to drop those too.
|
| 118 | 117 | ]
|
| 119 | - ++ [ terminfo | not windowsHost, (not cross || haveCurses) ]
|
|
| 118 | + -- Currently, we have no way to provide paths to [n]curses libs for
|
|
| 119 | + -- both - build and target - in cross builds. Thus, we only build it
|
|
| 120 | + -- for upper stages. As we only use stage0 to build upper stages,
|
|
| 121 | + -- this should be fine.
|
|
| 122 | + ++ [ terminfo | not windowsHost, not cross ]
|
|
| 120 | 123 | ++ [ timeout | windowsHost ]
|
| 121 | 124 | |
| 122 | 125 | -- | Packages built in 'Stage1' by default. You can change this in "UserSettings".
|
| ... | ... | @@ -136,6 +139,7 @@ stage1Packages = do |
| 136 | 139 | libraries0 <- filter good_stage0_package <$> stage0Packages
|
| 137 | 140 | cross <- flag CrossCompiling
|
| 138 | 141 | winTarget <- isWinTarget
|
| 142 | + haveCurses <- any (/= "") <$> traverse setting [ CursesIncludeDir, CursesLibDir ]
|
|
| 139 | 143 | |
| 140 | 144 | let when c xs = if c then xs else mempty
|
| 141 | 145 | |
| ... | ... | @@ -185,6 +189,10 @@ stage1Packages = do |
| 185 | 189 | [ -- See Note [Hadrian's ghci-wrapper package]
|
| 186 | 190 | ghciWrapper
|
| 187 | 191 | ]
|
| 192 | + , when (cross && haveCurses)
|
|
| 193 | + [
|
|
| 194 | + terminfo
|
|
| 195 | + ]
|
|
| 188 | 196 | ]
|
| 189 | 197 | |
| 190 | 198 | -- | Packages built in 'Stage2' by default. You can change this in "UserSettings".
|
| ... | ... | @@ -585,8 +585,14 @@ void *osReserveHeapMemory(void *startAddressPtr, W_ *len) |
| 585 | 585 | }
|
| 586 | 586 | #endif
|
| 587 | 587 | |
| 588 | + const int MAX_ATTEMPTS = 256;
|
|
| 589 | + void *bad_allocs[MAX_ATTEMPTS];
|
|
| 590 | + size_t bad_alloc_lens[MAX_ATTEMPTS];
|
|
| 591 | + memset(bad_allocs, 0, sizeof(void*) * MAX_ATTEMPTS);
|
|
| 592 | + memset(bad_alloc_lens, 0, sizeof(size_t) * MAX_ATTEMPTS);
|
|
| 593 | + |
|
| 588 | 594 | attempt = 0;
|
| 589 | - while (1) {
|
|
| 595 | + while (attempt < MAX_ATTEMPTS) {
|
|
| 590 | 596 | *len &= ~MBLOCK_MASK;
|
| 591 | 597 | |
| 592 | 598 | if (*len < MBLOCK_SIZE) {
|
| ... | ... | @@ -611,18 +617,35 @@ void *osReserveHeapMemory(void *startAddressPtr, W_ *len) |
| 611 | 617 | } else if ((W_)at >= minimumAddress) {
|
| 612 | 618 | // Success! We were given a block of memory starting above the 8 GB
|
| 613 | 619 | // mark, which is what we were looking for.
|
| 614 | - |
|
| 615 | 620 | break;
|
| 616 | 621 | } else {
|
| 617 | 622 | // We got addressing space but it wasn't above the 8GB mark.
|
| 618 | - // Try again.
|
|
| 619 | - if (munmap(at, *len) < 0) {
|
|
| 620 | - sysErrorBelch("unable to release reserved heap");
|
|
| 623 | + // Free any portion *above* 8GB and hang on to the rest to increase
|
|
| 624 | + // the likelihood that we get a suitable allocation next iteration.
|
|
| 625 | + uintptr_t end = (W_) at + *len;
|
|
| 626 | + bad_allocs[attempt] = at;
|
|
| 627 | + if (end > minimumAddress) {
|
|
| 628 | + if (munmap((void *) minimumAddress, end - minimumAddress) < 0) {
|
|
| 629 | + sysErrorBelch("unable to release high portion of low memory reservation");
|
|
| 630 | + }
|
|
| 631 | + bad_alloc_lens[attempt] = minimumAddress - (W_) at;
|
|
| 632 | + } else {
|
|
| 633 | + bad_alloc_lens[attempt] = *len;
|
|
| 621 | 634 | }
|
| 622 | 635 | }
|
| 623 | 636 | attempt++;
|
| 624 | 637 | }
|
| 625 | 638 | |
| 639 | + for (int i=0; i < MAX_ATTEMPTS; i++) {
|
|
| 640 | + if (bad_allocs[i] != NULL && munmap(bad_allocs[i], bad_alloc_lens[i]) < 0) {
|
|
| 641 | + sysErrorBelch("unable to release reserved heap");
|
|
| 642 | + }
|
|
| 643 | + }
|
|
| 644 | + |
|
| 645 | + if (at == NULL) {
|
|
| 646 | + sysErrorBelch("failed to reserve heap memory");
|
|
| 647 | + }
|
|
| 648 | + |
|
| 626 | 649 | return at;
|
| 627 | 650 | }
|
| 628 | 651 |
| ... | ... | @@ -14,7 +14,7 @@ def ignore_llvm_and_vortex( msg ): |
| 14 | 14 | |
| 15 | 15 | test('T25770', [normal, normalise_errmsg_fun(ignore_llvm_and_vortex)], compile_and_run, [''])
|
| 16 | 16 | test('T22487', [normal, normalise_errmsg_fun(ignore_llvm_and_vortex)], compile_and_run, [''])
|
| 17 | -test('T22033', [normal, normalise_errmsg_fun(ignore_llvm_and_vortex)], compile_and_run, [''])
|
|
| 17 | +test('T22033', [normal, unless(wordsize(64), skip), normalise_errmsg_fun(ignore_llvm_and_vortex)], compile_and_run, [''])
|
|
| 18 | 18 | test('T25730', [req_c, unless(arch('x86_64'), skip), normalise_errmsg_fun(ignore_llvm_and_vortex)], compile_and_run, ['T25730C.c'])
|
| 19 | 19 | # T25730C.c contains Intel instrinsics, so only run this test on x86
|
| 20 | 20 | test('T20645', [normal, normalise_errmsg_fun(ignore_llvm_and_vortex), when(have_llvm(), extra_ways(["optllvm"]))], compile_and_run, [''])
|
| ... | ... | @@ -22,7 +22,7 @@ data MergeObjs = MergeObjs { mergeObjsProgram :: Program |
| 22 | 22 | |
| 23 | 23 | findMergeObjs :: ProgOpt -> Cc -> CcLink -> Nm -> M MergeObjs
|
| 24 | 24 | findMergeObjs progOpt cc ccLink nm = checking "for linker for merging objects" $ do
|
| 25 | - prog <- findProgram "linker for merging objects" progOpt ["ld.gold", "ld"]
|
|
| 25 | + prog <- findProgram "linker for merging objects" progOpt ["ld"]
|
|
| 26 | 26 | let mo = prog & _prgFlags %++ "-r"
|
| 27 | 27 | checkMergingWorks cc nm mo
|
| 28 | 28 | checkForGoldT22266 cc ccLink mo
|