Compiling with --stack-auto is equivalent to having all functions marked __reentrant. Thus the regression test failures for the mos6502-stack-auto target can affect even users that do not use --stack-auto, as long as they use some reentrant functions. There are currently a lot of such failures, especially considering that the mos6502 port is considered stable.
IMO, the worst ones are the ones where assertions fail (at regression test runtime), since this means that bad code was generated silently. There also are lots of "FATAL Compiler Internal Error", but IMO, these are less of a problem, since it is a compile-time failure, which is obvious to the users.
I am down to 41 failures. Some are likely stack overflow giving the limited 256 bytes stack, but many are real failures.
I'll keep working on them.
There was clear progress here: by now, I see only 44 failures left on my Debian GNU/Linux amd64 testing system:
I recently checked in a few bugfixes. It should be down to 41 now.
Several tests fail because of an issue with returning structs which is only partially implemented in the non stack-auto port.
I'll keep working on the remaining failures. Hopefully I can clean most of them before the hard freeze.
with [r14538] the failures are down to 31
Related
Commit: [r14538]
with [r14610] I disabled many tests that fail due to stack size limitations.
Related
Commit: [r14610]
with [r15285] i am down to 3 failing tests:
Related
Commit: [r15285]
I see one more on my laptop:
Either way, looks like you can enable test-uc6502-stack-auto in sdcc-build/lib/variables.mk soon.
with the latest [r15970] check in i am down to just one failure.
This might be due to a stack overflow due to the limited stack space.
Related
Commit: [r15970]
Last edit: Gabriele Gorla 2025-12-15
That is great news. You can check for stack overflow with uCsim, and setting a watchpoint on the bytes close to where the stack would overflow.
Once it passes or you disable the test, you can enable the regression test target test-uc6502-stack-auto in sdcc-build/lib/variables.mk (it is currently commented out there) to include it in the nightly compile farm testing.
I disabled the test and added mos6502-stack-auto to the regression with [r16018]
Related
Commit: [r16018]