Uh oh!
There was an error while loading. Please reload this page.
Fix use-after-free bug in registry_watcher - #554
Conversation
Uh oh!
There was an error while loading. Please reload this page.
David Machaj (dmachaj)
commented
Oct 29, 2025
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Chris Guzak (ChrisGuzak)
commented
Oct 29, 2025
looks good. do you have a synthetic test that shows the problem and validates the fix? |
| // Sleep(1); // Enable for testing to find use after free bugs. | ||
| } | ||
| else if (rearm) | ||
| else if (rearm && refCount > 0) |
There was a problem hiding this comment.
This suggests you are guarding against negative values. If you've seen this actually happen, we'd be very interested to learn more since that would suggest there's a mis-match of AddRef and Release.
Duncan Horn (dunhor)
commented
Oct 30, 2025
Something seems fishy here. You do mention:
which may technically have some merit to it since I'll second Chris' question - I'd like to know more about the scenario where you've seen issues. |
Fix the following scenario: