bebbo / libnix

libnix (v4): a C link library for AmigaOS/m68k
15 stars 9 forks source link

swapstack.o is no longer in libnix*.a #81

Closed BSzili closed 6 months ago

BSzili commented 6 months ago

I tried looking at the recent makefile changes, but I didn't find the cause yet. Could you look into this?

BSzili commented 6 months ago

Fixed by ef23522, thank you!

BSzili commented 6 months ago

Sorry, I'd like to reopen this as I missed something, and I didn't want to spam new issues. swapstack.o is now in place and stkinit works as expected, but after the program completes I get a crash at exit. It's possible that I ran into another race condition, or maybe stkexit is called too early/late? I uploaded a complete test case here: https://bszili.morphos.me/stuff/stacktest2.zip The source code of the test program separately: https://bszili.morphos.me/stuff/stacktest.c

BSzili commented 6 months ago

Thanks for the quick fix! It seems like there is more to this than I initially expected, so the simple test case I made was insufficient. I managed to narrow down the cause to allocating a large variable on the stack and calling exit() instead of returning from the main function. Please have a look at the updated test program: https://bszili.morphos.me/stuff/stacktest.c https://bszili.morphos.me/stuff/stacktest

bebbo commented 6 months ago

please test

BSzili commented 6 months ago

Everything seems to be working now, great work! I'm closing the issue.