Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not remove stopped blocks from stack twice #1330

Merged
merged 1 commit into from
Aug 17, 2023

Conversation

LauraLMann
Copy link
Collaborator

In cpu-exec.c, in the before-block-exec callback for a block, the callstack_instr plugin removes the block from the stack if it is the block that a return instruction returns to. The problem is if the flag to say the block is interrupted is set between this point and when the block prologue is executed, the block will be Stopped, and then when the block is run for real after dealing with the interruption, then the block is removed from the callstack again (if it is there). This doesn't happen a lot (our test case had to run about 200 times before we saw it, and of course it happened once during regression testing which prompted a search for a problem).
This problem and a related problem were fixed once before, by two different groups, and the merge together caused a problem which it appears was resolved (in 2020) by removing too much of one of the original solution.

@AndrewFasano
Copy link
Member

Thanks for the detailed explanation and fix!

@AndrewFasano AndrewFasano merged commit 354b5a3 into panda-re:dev Aug 17, 2023
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants