Infinite recursion when using -debug and DEBUG_LOCKORDER #1213

issue TheBlueMatt opened this issue on May 6, 2012
  1. TheBlueMatt commented at 11:43 PM on May 6, 2012: member

    push_lock -> printf -> OutputDebugStringF -> GetDataDir -> LOCK -> push_lock

  2. gavinandresen commented at 12:16 AM on May 7, 2012: contributor

    LOCK inside OutputDebugStringF or any of the routines it calls is a big no-no...

  3. sipa commented at 12:36 AM on May 7, 2012: member

    GetDataDir should not lock, except the first time it is called

  4. TheBlueMatt commented at 12:43 AM on May 7, 2012: member

    You could reasonably just remove the lock, GetDataDir is called a few times before any other threads are started, so its pretty safe, but I probably missed an edge case or two.

  5. sipa commented at 12:45 AM on May 7, 2012: member

    Or make sure it's called once beforehand?

  6. TheBlueMatt commented at 1:04 AM on May 7, 2012: member

    Simple enough either way.

  7. laanwj commented at 9:40 AM on March 29, 2013: member

    Is this still the case?

  8. laanwj added the label Tests on Jul 31, 2014
  9. sipa commented at 11:08 PM on August 3, 2014: member

    I believe this code was significantly changed since.

  10. laanwj closed this on Feb 9, 2016

  11. suprnurd referenced this in commit ff12698ed5 on Dec 5, 2017
  12. lateminer referenced this in commit c87e273f50 on Jan 22, 2019
  13. dexX7 referenced this in commit d17e8c7ef7 on Apr 8, 2021
  14. MarcoFalke 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-13 21:16 UTC

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