Magnus pushed to branch ghc-9.14 at Glasgow Haskell Compiler / GHC
Commits:
-
b72cc992
by Cheng Shao at 2026-04-15T15:23:21+02:00
-
b422b4c3
by Ben Gamari at 2026-04-16T10:01:33+02:00
-
8fb179ea
by mangoiv at 2026-04-16T16:12:50+02:00
4 changed files:
Changes:
| ... | ... | @@ -1033,8 +1033,8 @@ findPtr(P_ p, int follow) |
| 1033 | 1033 | {
|
| 1034 | 1034 | uint32_t g, n;
|
| 1035 | 1035 | bdescr *bd;
|
| 1036 | - const int arr_size = 1024;
|
|
| 1037 | - StgPtr arr[arr_size];
|
|
| 1036 | +#define ARR_SIZE 1024
|
|
| 1037 | + StgPtr arr[ARR_SIZE];
|
|
| 1038 | 1038 | int i = 0;
|
| 1039 | 1039 | searched = 0;
|
| 1040 | 1040 | |
| ... | ... | @@ -1044,24 +1044,24 @@ findPtr(P_ p, int follow) |
| 1044 | 1044 | // just before a block is used.
|
| 1045 | 1045 | for (n = 0; n < getNumCapabilities(); n++) {
|
| 1046 | 1046 | bd = nurseries[i].blocks;
|
| 1047 | - i = findPtrBlocks(p,bd,arr,arr_size,i);
|
|
| 1048 | - if (i >= arr_size) return;
|
|
| 1047 | + i = findPtrBlocks(p,bd,arr,ARR_SIZE,i);
|
|
| 1048 | + if (i >= ARR_SIZE) return;
|
|
| 1049 | 1049 | }
|
| 1050 | 1050 | #endif
|
| 1051 | 1051 | |
| 1052 | 1052 | for (g = 0; g < RtsFlags.GcFlags.generations; g++) {
|
| 1053 | 1053 | bd = generations[g].blocks;
|
| 1054 | - i = findPtrBlocks(p,bd,arr,arr_size,i);
|
|
| 1054 | + i = findPtrBlocks(p,bd,arr,ARR_SIZE,i);
|
|
| 1055 | 1055 | bd = generations[g].large_objects;
|
| 1056 | - i = findPtrBlocks(p,bd,arr,arr_size,i);
|
|
| 1057 | - if (i >= arr_size) return;
|
|
| 1056 | + i = findPtrBlocks(p,bd,arr,ARR_SIZE,i);
|
|
| 1057 | + if (i >= ARR_SIZE) return;
|
|
| 1058 | 1058 | for (n = 0; n < getNumCapabilities(); n++) {
|
| 1059 | 1059 | i = findPtrBlocks(p, gc_threads[n]->gens[g].part_list,
|
| 1060 | - arr, arr_size, i);
|
|
| 1060 | + arr, ARR_SIZE, i);
|
|
| 1061 | 1061 | i = findPtrBlocks(p, gc_threads[n]->gens[g].todo_bd,
|
| 1062 | - arr, arr_size, i);
|
|
| 1062 | + arr, ARR_SIZE, i);
|
|
| 1063 | 1063 | }
|
| 1064 | - if (i >= arr_size) return;
|
|
| 1064 | + if (i >= ARR_SIZE) return;
|
|
| 1065 | 1065 | }
|
| 1066 | 1066 | if (follow && i == 1) {
|
| 1067 | 1067 | debugBelch("-->\n");
|
| ... | ... | @@ -585,7 +585,7 @@ void *osReserveHeapMemory(void *startAddressPtr, W_ *len) |
| 585 | 585 | }
|
| 586 | 586 | #endif
|
| 587 | 587 | |
| 588 | - const int MAX_ATTEMPTS = 256;
|
|
| 588 | +#define MAX_ATTEMPTS 256
|
|
| 589 | 589 | void *bad_allocs[MAX_ATTEMPTS];
|
| 590 | 590 | size_t bad_alloc_lens[MAX_ATTEMPTS];
|
| 591 | 591 | memset(bad_allocs, 0, sizeof(void*) * MAX_ATTEMPTS);
|
| ... | ... | @@ -25,7 +25,7 @@ from testglobals import config, ghc_env, default_testopts, brokens, t, \ |
| 25 | 25 | from testutil import strip_quotes, lndir, link_or_copy_file, passed, \
|
| 26 | 26 | failBecause, testing_metrics, residency_testing_metrics, \
|
| 27 | 27 | stable_perf_counters, \
|
| 28 | - PassFail, badResult, memoize
|
|
| 28 | + PassFail, badResult, str_warn
|
|
| 29 | 29 | from term_color import Color, colored
|
| 30 | 30 | import testutil
|
| 31 | 31 | from cpu_features import have_cpu_feature
|
| ... | ... | @@ -3005,6 +3005,12 @@ def normalise_errmsg(s: str) -> str: |
| 3005 | 3005 | # Emscripten displays cache info and old emcc doesn't support EMCC_LOGGING=0
|
| 3006 | 3006 | s = re.sub('cache:INFO: .*\n', '', s)
|
| 3007 | 3007 | |
| 3008 | + # on newer versions of MacOS X, the shipped ranlib warns about object files with no symbols,
|
|
| 3009 | + # however, these are completely benign stubs.
|
|
| 3010 | + # See https://gitlab.haskell.org/ghc/ghc/-/issues/27116
|
|
| 3011 | + if opsys('darwin'):
|
|
| 3012 | + s = modify_lines(s, lambda l: re.sub(r'.*ranlib:.*has no symbols', '', l))
|
|
| 3013 | + |
|
| 3008 | 3014 | return s
|
| 3009 | 3015 | |
| 3010 | 3016 | # normalise a .prof file, so that we can reasonably compare it against
|
| ... | ... | @@ -3420,9 +3426,20 @@ if config.msys: |
| 3420 | 3426 | exception = e
|
| 3421 | 3427 | retries -= 1
|
| 3422 | 3428 | |
| 3429 | + # Don't fail as framework error if cleanup fails here, just
|
|
| 3430 | + # print the warning and proceed. I've seen new failure mode
|
|
| 3431 | + # here on Windows Server 2025 and recent msys2 installation:
|
|
| 3432 | + # fifo.lnk is created as read-only and the on_error trick
|
|
| 3433 | + # above somehow doesn't work.
|
|
| 3434 | + #
|
|
| 3435 | + # For a local testsuite run, it's in %TEMP% that will be
|
|
| 3436 | + # periodically cleaned up anyway; for CI, there's post-job
|
|
| 3437 | + # cleanup and runner level cleanup. It's better to report
|
|
| 3438 | + # actual job pass/failure than to waste CPU cycles to spurious
|
|
| 3439 | + # Windows misery.
|
|
| 3423 | 3440 | if retries == 0 and testdir.exists():
|
| 3424 | - raise Exception("Unable to remove folder '%s': %s\nUnable to start current test."
|
|
| 3425 | - % (testdir, exception))
|
|
| 3441 | + print(str_warn("Unable to remove folder '%s': %s\nUnable to start current test."
|
|
| 3442 | + % (testdir, exception)))
|
|
| 3426 | 3443 | else:
|
| 3427 | 3444 | def cleanup() -> None:
|
| 3428 | 3445 | testdir = getTestOpts().testdir_raw
|
| ... | ... | @@ -120,9 +120,7 @@ if config.os == 'darwin': |
| 120 | 120 | else:
|
| 121 | 121 | only_darwin = skip
|
| 122 | 122 | |
| 123 | -test('static001', [extra_files(['Static001.hs']),
|
|
| 124 | - only_darwin,
|
|
| 125 | - when(arch('x86_64'), expect_broken(8127))],
|
|
| 123 | +test('static001', [extra_files(['Static001.hs']), only_darwin],
|
|
| 126 | 124 | makefile_test, ['static001'])
|
| 127 | 125 | |
| 128 | 126 | test('dynHelloWorld',
|