Race condition in CScheduler::serviceQueue #6394

issue GSPP opened this issue on July 7, 2015
  1. GSPP commented at 9:09 PM on July 7, 2015: none

    CScheduler::serviceQueue has the following code:

    +            lock.unlock();
    +            f();
    +            lock.lock();
    +        } catch (...) {
    +            --nThreadsServicingQueue;
    +            throw;
    +        }
    

    In case f throws the statement --nThreadsServicingQueue; will run while not protected by the lock. This is a race condition and UB.

  2. laanwj commented at 4:37 AM on July 8, 2015: member

    Good catch.

  3. laanwj added the label Bug on Jul 8, 2015
  4. laanwj closed this on Aug 19, 2015

  5. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me