When running the minimal test case of ``extern(C) int main() {assert(0);}``, dmd would segfault (this also applies to ldc2).
Expected behavior: ``file: /home/user/file.d:2: file.main: Assertion `0' failed.``
Observed behavior: ``Segmentation Fault``
Comment #1 by dlang-bot — 2024-05-23T04:31:21Z
@Connor-GH updated dlang/dmd pull request #16515 "Fix assert; arguments were in reverse order" fixing this issue:
- Fix bugzilla issue 24558: C asserts segfault on Glibc
Use irs.target.c.runtime instead of version(CRuntime_)
Unify musl and glibc implementation
https://github.com/dlang/dmd/pull/16515
Comment #2 by dlang-bot — 2024-05-23T08:38:01Z
dlang/dmd pull request #16515 "Fix assert; arguments were in reverse order" was merged into master:
- e97c9365f1f1ea08fbc45f45ad6a28bf57a418e7 by Connor:
Fix bugzilla issue 24558: C asserts segfault on Glibc
Use irs.target.c.runtime instead of version(CRuntime_)
Unify musl and glibc implementation
https://github.com/dlang/dmd/pull/16515