Looking at the snapshots page, apparently all tests fail for the s08-stack-auto target on 64-bit Windows.
I guess the issue was not noticed earlier due to common sporadic false results being reported for Windows. But looking at the logs, I see the s08-stack-auto failures on both on the tests from 2024-01-02 and 2023-12-31.
I can confirm that the generated .ihx files are wrong: When I take a regression test .ihx file generated by the 64-bit Windows build of SDCC and run it in uCsim on GNU/Linux is still fails:
It hangs here. The next character printed should have been a '1'.
It looks like for 64-bit windows, the s08 libray gets linked, not the s08-stack-auto one. Then everything breaks apart when support functions for % get called, resulting in an endless loop.
Looks like this bug is much worse than thought:
The wrong library gets linked, except for regression testing on non-Windows! E.g. the library is also wrong on GNU/Linux when just compiling something normally (outside of running regression tests).
The attached patch should fix this issue. Looks ok to me on GNU/Linux.
Looks good to me. Please apply and close.
Fixed in [r14504].
Related
Commit: [r14504]
Fixed in [r14504].
Related
Commit: [r14504]
Hmm. On Debian GNU/Linux I now see the correct lib path for s08-stack-auto in the .lk files.
But on 64-Bit Windows the regression tests still fail as before.
So my fix only fixed the bug for the non-regression-test case.
P.S.: pdk15 and s08 are similar here: Both do have a separate stack-auto library, and for both we regression test with both. We see that the correct library is chosen for pdk15, but not s08 in the .lk files from the 64-bit Windows regression tests (attached).
Last edit: Philipp Klaus Krause 2024-01-13
Apparently the remaining bug really is just a 64-bit Windows issue: The 32-Bit Windows snapshots failed to compile s08-stack-auto due to [bugs:#3695], i.e. on 32-Bit Windows the correct (missing before that bug got fixed) library would be linked for s08-stack-auto.
Related
Bugs:
#3695Last edit: Philipp Klaus Krause 2024-01-16
So, comparing s08-stack-auto and pdk15-stack-auto again. When just invoking sdcc manually (outside regression tests), both seems fine. When inside regression tests, I see that the command used to invoke sdcc for those is:
vs.
I see no suspicious differences here.
But in the .lk files, the -k lines differ (the rest of the lines is fine):
vs.
Now, the -k apparently gets set in src/SDCCmain.c from libPathsSet and libDirsSet. It looks like libPathsSet would be the result of an -L option to SDCC, which we don't have here. That would leave libDirsSet, which apparently gets set in setLibPath from src/SDCCmain.c. But setLibPath looks like it always calls an available port->general.get_model to get the model (which is consistent with what I see everywhere except for regression testing on 64-Bit Windows for s08-stack-auto).
I'm much closer to solving this:
Apparently what should be 64-bit regression testing is actually 32-bit regression testing of an old version (that does not yet have the "partial" fix for this:
Windows regression testing is done by installing sdcc, the using the sdcc in the path. This can pick up the wrong sdcc, if multiple are installed. The infrastructure uninstalls old versions first, but only for the same architecture. I.e. A machine that build 32-bit snapshots at some and 64-bit snapshots at some time will have both 32-bit and 64-bit versions installed, and only one of the is uninstalled.
So what should have been 64-bit tests results were actually 32-bit ones from the older version.
I'll retry all the 64-bit testing after manually uninstalling the old versions. If that works, this bug is fixed, but we should probably deal with the bigger picture still.
This issue is now fixed, the newly discovered issue (32-Bit snapshots results appearing as 64-Bit ones) has a new ticket: [bugs:#3698].
Related
Bugs:
#3698