about external variable chainActive #9877

issue viennadd opened this issue on February 27, 2017
  1. viennadd commented at 3:20 PM on February 27, 2017: none

    our tool reported a NULL pointer dereference, but I don't sure the thing,

    I am wondering under what situation that we can assure the extern CChain chainActive; in validation.h has more than one element? (doesn't need NULL checking after chainActive.Tip())

    one of the reported locations: mining.cpp#L504

              while (chainActive.Tip()->GetBlockHash() == hashWatchedChain && IsRPCRunning())
    
  2. TheBlueMatt commented at 8:42 PM on February 27, 2017: member

    I assume this was being reported to you by some automated tool, which "our tool" was a reference to. Generally chainActive.Tip() is set after initialization has completed (either to a block or the genesis block).

  3. laanwj added the label Questions and Help on Feb 28, 2017
  4. laanwj commented at 11:34 AM on February 28, 2017: member

    Looks like this question is answered, closing.

  5. laanwj closed this on Feb 28, 2017

  6. 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 21:15 UTC

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