On 14-5-2022 17:51, Jonas Maebe via fpc-pascal wrote:
On 14/05/2022 17:31, Marco van de Voort via fpc-pascal wrote:
Also when an exception happens, the stack pointer is not as expected in exception frames (don't know if that really is an issue, but I can image).  It would be interesting how C handles this (e.g. exceptions while alloca called in a loop?)

This is handled via dwarf call frame information, which is also generated by the compiler. It describes how to restore the stack pointer for every instruction address where it changes.

I was thinking about SEH, but same principle. But that is exactly what I expected, so if you manually mutate the stack pointer using assembler, it won't register in the unwind info frames.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to