[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [BUG] call hook again when lua yield in count hook
- From: Roberto Ierusalimschy <roberto@...>
- Date: Fri, 21 Jul 2023 15:23:16 -0300
> A correction
Thanks for the feedback.
The bug seems to be caused by the iteraction between both hooks. It
seems to go like that:
- The function starts: As the function is in its first instruction,
it calls the Call hook.
- Then, it checks the Count hook. As its counter goes to zero,
it calls the Count hook *and* does not move the program counter,
because it does not execute the current instruction yet.
- When the thread resumes, it is (yet) in the first instruction of
the current function, so it calls the Call hook again.
-- Roberto