From 13e368654f1ac13c70e6a5f71d7a1e09920e480b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 3 Mar 2026 08:49:33 +0100 Subject: [PATCH 1/4] Force reinterpret-cast to reverse the cast in FunctionDefinition.semantic. With LDC 1.42.0, the direct cast from Statement to FunctionDefintion returns null, causing a segmentation fault later on. Casting to void* first forces a reinterpret cast and is symmetric with the code in FunctionDefinition.semantic(). --- engine/source/dmdscript/expression.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/source/dmdscript/expression.d b/engine/source/dmdscript/expression.d index 2d092f0..c419edd 100644 --- a/engine/source/dmdscript/expression.d +++ b/engine/source/dmdscript/expression.d @@ -608,7 +608,7 @@ class FunctionLiteral : Expression override Expression semantic(Scope *sc) { - func = cast(FunctionDefinition)(func.semantic(sc)); + func = cast(FunctionDefinition)cast(void*)func.semantic(sc); return this; } From 7d7292cf3e8b43071baa35b6f7f891ee5976aee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 3 Mar 2026 08:53:22 +0100 Subject: [PATCH 2/4] Use newer upload-artifact version. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a733ef1..e4c5a91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,7 +55,7 @@ jobs: run: ./run-test262.sh - name: Upload log - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: always() with: name: runtest262 log From 950131f1703d0a7ccd78c789a60eb8bcdbfa3703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 3 Mar 2026 09:02:52 +0100 Subject: [PATCH 3/4] Patch python update related error in the test suite. --- test262-patches/test262-parseTestRecord.py.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test262-patches/test262-parseTestRecord.py.patch b/test262-patches/test262-parseTestRecord.py.patch index 5d0281f..711562b 100644 --- a/test262-patches/test262-parseTestRecord.py.patch +++ b/test262-patches/test262-parseTestRecord.py.patch @@ -2,6 +2,15 @@ diff --git "a/src/parseTestRecord.py" "b/src/parseTestRecord.py" index 22d5664..5be3a5f 100644 --- "a/src/parseTestRecord.py" +++ "b/src/parseTestRecord.py" +@@ -16,7 +16,7 @@ + import sys + import tempfile + import time +-import imp ++import importlib + + from _monkeyYaml import load as yamlLoad + @@ -78,7 +78,7 @@ def yamlAttrParser(testRecord, attrs, name): parsed = yamlLoad(body) From 72edb24c5829e3f49960848cff3d1785771e29d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Tue, 3 Mar 2026 09:12:30 +0100 Subject: [PATCH 4/4] Bump nuber of passed tests up to 5239. --- run-test262.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-test262.sh b/run-test262.sh index 6dfab93..c301be0 100755 --- a/run-test262.sh +++ b/run-test262.sh @@ -29,7 +29,7 @@ cd test262-harness-py python3 src/test262.py --summary --non_strict_only --command ../timed-dmdscript.sh --tests=../test262 | tee ../dmdscript-test262.log | grep -a '=== .* failed in .* ===' cd .. -EXPECTED_TO_PASS=5238 +EXPECTED_TO_PASS=5239 PASSED=$(grep -a ' - Passed [0-9]* tests' dmdscript-test262.log | sed -n 's/.*Passed \([0-9]*\) tests.*/\1/;P') if [ "$PASSED" -gt "$EXPECTED_TO_PASS" ]; then