Skip to content

Conversation

@jmh530
Copy link
Contributor

@jmh530 jmh530 commented Jan 19, 2026

On Windows 11 with dmd 2.112.0, I get the error message below with dub test. I do not have this issue currently with the CI (perhaps because it is not using Windows 11?).

The issue seems to be related to the runtime handling some of these lower bound values inconsistently. The fix basically relaxes the equality check at the subnormal range.

C:\Users\[user]\Documents\Github\mir-algorithm>dub test
             Generating test runner configuration 'mir-algorithm-test-default' for 'default' (library).
    Starting Performing "unittest" build using C:\D\dmd2\windows\bin64\dmd.exe for x86_64.
  Up-to-date mir-core 1.7.3: target for configuration [library] is up to date.
    Building mir-algorithm ~master: building configuration [mir-algorithm-test-default]
Mir warning: can't compute hash. Expexted `size_t toHash() scope @safe const pure nothrow @nogc` method for Algebraic!(Ion_)
Warning: multivariate cubic spline with derivatives was not tested!!!
Warning: multivariate cubic spline with derivatives was not tested!!!
     Linking mir-algorithm-test-default
    Finished To force a rebuild of up-to-date targets, run again with --force
     Running mir-algorithm-test-default.exe

mir.exception.MirError@source\mir\parse.d(212): mir.test.should:
expected 0.0
     got 5e-324
----------------
0x0000000140887BD7 in d_throwc
0x0000000140857D89 in mir.test.Should!double.Should.opEquals!double.opEquals.__lambda_L106_C30 at C:\Users\[user]\Documents\Github\mir-algorithm\source\mir\test.d(106)
0x000000014085704D in mir.test.assumeAllAttrAndCall at C:\Users\[user]\Documents\Github\mir-algorithm\source\mir\test.d(12)
0x0000000140857CA9 in mir.test.Should!double.Should.opEquals!double.opEquals at C:\Users\[user]\Documents\Github\mir-algorithm\source\mir\test.d(106)
0x00000001407E1454 in mir.parse.__unittest_L163_C18.test at C:\Users\[user]\Documents\Github\mir-algorithm\source\mir\parse.d(212)
0x00000001407E0DD8 in mir.parse.__unittest_L163_C18 at C:\Users\[user]\Documents\Github\mir-algorithm\source\mir\parse.d(221)
0x00000001407E772A in void mir.parse.__modtest()
0x00000001408B6AEB in int core.runtime.runModuleUnitTests().__foreachbody_L603_C5(object.ModuleInfo*)
0x000000014088A777 in int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*)).__lambda_L2519_C13(immutable(object.ModuleInfo*))
0x00000001408A5214 in int rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*))).__foreachbody_L585_C5(ref rt.sections_win64.SectionGroup)
0x00000001408B6F6C in int rt.sections_win64.SectionGroup.opApply(scope int delegate(ref rt.sections_win64.SectionGroup))
0x00000001408A519B in int rt.minfo.moduleinfos_apply(scope int delegate(immutable(object.ModuleInfo*)))
0x000000014088A747 in int object.ModuleInfo.opApply(scope int delegate(object.ModuleInfo*))
0x00000001408B6990 in runModuleUnitTests
0x00000001408A4CA5 in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll()
0x00000001408A4C1F in void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).tryExec(scope void delegate())
0x00000001408A4B2A in d_run_main2
0x0000000140887B19 in d_run_main
0x0000000140001D32 in dub_test_root._d_cmain!().main at C:\D\dmd2\windows\bin64\..\..\src\druntime\import\core\internal\entrypoint.d(29)
0x000000014091805E in mainCRTStartup
0x00007FFA2316E8D7 in BaseThreadInitThunk
0x00007FFA234EC53C in RtlUserThreadStart
mir.stdio.dout test! - @nogc I/O
mir.stdio.derr test! - @nogc I/O
mir.stdio.tout test! - @nogc nothrow I/O
mir.stdio.terr test! - @nogc nothrow I/O
1/75 modules FAILED unittests
Error Program exited with code 1

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.

1 participant