Fix use-after-free bug in registry_watcher#554
Fix use-after-free bug in registry_watcher#554Royar13 wants to merge 2 commits intomicrosoft:masterfrom
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
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.
|
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: