This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
Coverage task does not maintain internal invariant on error #1031
Labels
bug
Something isn't working
OneFuzz: 2.23.1
OS: Windows
In the coverage task, the (blocking, non-async) recording itself occurs on a new OS thread, via
spawn_blocking()
.To avoid needing to use
sync
primitives, we justOption::take()
theTaskContext
'sModuleCache
, and pass it to the worker thread, restoring it on completion. However, if recording fails, we now retry some number of times, as of #978. But recording can fail while the worker thread owns theModuleCache
, which it will drop on its return withErr
. We will then early-exitTaskContext::record_impl()
, without restoring theOption<ModuleCache>
, which can result in a panic.Switch to using threadsafe smart pointers, instead.
The text was updated successfully, but these errors were encountered: