Skip to content

Merge stable#23136

Closed
thewilsonator wants to merge 250 commits into
dlang:masterfrom
thewilsonator:merge-stable2
Closed

Merge stable#23136
thewilsonator wants to merge 250 commits into
dlang:masterfrom
thewilsonator:merge-stable2

Conversation

@thewilsonator
Copy link
Copy Markdown
Contributor

@thewilsonator thewilsonator commented May 15, 2026

This is expected to fail, I have not yet updated the line number is in that static array[$] test yet.

ibuclaw and others added 30 commits March 23, 2026 15:32
…quested" (dlang#22863)

* Fixup "Disable rewriting of finally statements to sequences unless requested"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Detab

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
That function was converted to a free-standing function in v2.113.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…uses ICE (dlang#22941)

CTFE used to check after interpreting if there were any changes, but it neglected the interpretation of the basis element, keeping it around uninterpreted which trips up the compiler down the line.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ing literal causes segfault

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
In `elcond`, when restructuring `((a,b) ? c : d)` into `(a, (b ? c : d))`,
`Ety` was copied to the new inner OPcond but `ET` was not. This left the
OPcond with TYstruct Ety but null ET, causing `elstruct` to return early
and `exp2_copytotemp` to crash with `assert(ty != TYstruct)`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nce (dlang#22914)

* Fix dlang#21707 - segfault with -vcg-ast and foreach on a tuple sequence

* List vcg-ast output as OUTPUT_FILES

* Add expected output file to TEST_OUTPUT

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…set for struct arrays, fixing the segfault in rt_finalize2 during GC sweep (dlang#22884)
…e subnormal

Which LDC detects and rejects at parse time:
```
Error: number `1e-308` is not representable as a `double`
```
Firstly, Apple targets diverge and don't have a special case for ARM64
wrt. anonymous bit fields contributing to the aggregate alignment:
https://cpp.godbolt.org/z/44GcTKnvY

Secondly, some `extern(D)` sizeofs were wrong (probably typos).
… empty (dlang#23082)

* druntime: reset evStackFilled at end of markParallel

Fix dlang#23081.

`evStackFilled` is a manual-reset event (initialized by
`startScanThreads` with `manualReset=true`). The only places that
reset it are inside the global scan-stack pop paths
(`pullFromScanStackImpl` and `scanStackPopLocked`), both after the
last item has been popped.

`markParallel` unconditionally sets `evStackFilled` before entering
its pull loop. If the collection has so few roots that
`pointersPerThread == 0` (i.e. `toscanRoots.length < numScanThreads
+ 1`), nothing is pre-pushed onto the global stack; and if the
breadth of live structure stays below `mark`'s `FANOUT_LIMIT == 32`,
nothing spills from the local stack into the global stack either.
In that case no pop ever happens, so `evStackFilled` is never
reset. After `markParallel` returns, the background scan threads
spin in `scanBackground`: `evStackFilled.wait()` returns
immediately, `pullFromScanStack` is a no-op, `evDone` is
broadcast, repeat -- pegging every CPU.

Reset `evStackFilled` symmetrically with the `setIfInitialized()`
above the pull loop, so that after `markParallel` returns the
event reflects the actual state (no work pending). When `pullLoop`
returns, `pullFromScanStackImpl` has reported `busyThreads == 0`
with an empty stack; from that point until this reset no worker
can push (push only happens from `mark()`, which is only entered
after a successful pop, which requires a non-empty stack), so no
concurrent `setIfInitialized` can race with this reset.

* test: add druntime regression test for GC parallel-mark livelock (dlang#23081)

Measures total process CPU consumption against wall time during a
500ms quiescent sleep after automatic GC collections. With the
livelock, the background scan threads each peg a CPU, pushing the
ratio into the tens. Healthy is near 0.

Uses --DRT-gcopt=parallel:128 (capped to logical_cpus - 1 by
startScanThreads) so the test is effective on many-core machines;
on few-core CI runners the bug cannot manifest (numScanThreads + 1
fits within toscanRoots.length) and the test passes without
exercising the regression path.

Posix-only (uses getrusage), so listed in the Posix-only TESTS
group of druntime/test/gc/Makefile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
… shared` AA

const is already inferred by the shared overload
calls to gcx.fullcollect have not been updated in dlang#16401 when removing the first argument
WalterBright and others added 25 commits May 16, 2026 07:08
the internal object file happens to have a signature not triggering the bad check for big object header
… combinations (dlang#23023)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Available only on Posix platforms. Useful for testing of context switching
…ctions (dlang#22922)

inlined functions always showed 0000000 in -cov reports even when called.
the standalone function body is never executed at runtime (it's inlined at
each call site), so its counters stayed zero.

fixes https://issues.dlang.org/show_bug.cgi?id=5848
fixes dlang#18337
@thewilsonator thewilsonator requested a review from ibuclaw as a code owner May 15, 2026 23:10
@dlang-bot
Copy link
Copy Markdown
Contributor

Thanks for your pull request and interest in making D better, @thewilsonator! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

  • In preparation for migrating from Bugzilla to GitHub Issues, the issue reference syntax has changed. Please add the word "Bugzilla" to issue references. For example, Fix Bugzilla Issue 12345 or Fix Bugzilla 12345.(Reminder: the edit needs to be done in the Git commit message, not the GitHub pull request.)

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#23136"

@thewilsonator thewilsonator deleted the merge-stable2 branch May 22, 2026 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.