On Wed, Dec 05, 2007 at 06:18:22PM +0000, Jeremy Henty wrote:
On Wed, Dec 05, 2007 at 12:34:18PM -0300, Jorge Arellano Cid wrote:
The problem is reentrancy.
Aha! I did some testing and noticed that calls to a_IO_ccc were sometimes nested.
This bug was produced because a CCC operation was reentering the same chain after it was aborted. I added an extra check as a workaround to avoid this situation and a comment that a more generic solution should be designed.
Hmm, perhaps the CCC Chainlink structures could have an aborted flag and the chaining functions could call the callbacks only if the link was not aborted?
Yes. I gave that idea a quick try and realized I had to decide better whether to allow some reentrancy, why/when and how, and also to check if that was already happening...
Also, I noticed that a_Chain_unlink is never used. Is that intentional?
It's just an API idea. -- Cheers Jorge.-