Skip to content

Inquiry about jmpbuf usage in DynaRun function of box64 /src/dynarec.c #974

Answered by ptitSeb
ShanZeHu asked this question in Q&A
Discussion options

You must be logged in to vote

This change would defeat the purpose of those jumpbuf.

First thing to note, is that the jumpbuf is not initialized at every while loop. Only in rare occasion (check the "if" in front of it).
Now, the purpose of this jumpbuff is to provide a "rollback" mecanism when a ssignal is restoring the execution to another address. That way, the execution stack on native side is a sane (because the signal might occur anywhere, and so maybe in some native function call).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ShanZeHu
Comment options

Answer selected by ShanZeHu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants