bebbo / libnix

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

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

Closed BSzili closed 1 month ago

BSzili commented 2 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 1 month ago

Fixed by ef23522, thank you!

BSzili commented 1 month 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 1 month 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 1 month ago

please test

BSzili commented 1 month ago

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