Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix for nullptr deref when producers are waiting #5256

Merged
merged 1 commit into from
Aug 15, 2018

Conversation

wanderingbort
Copy link
Contributor

#4972 created a different calling path into producer_plugin_impl::calculate_next_block_time where there was no pending block state. As a result when the following conditions were met the code would dereference a null ptr:

  • the node was a producer, who had produced during this processes lifetime OR replayed a block where they produced (so they have watermark data)
  • still in the active schedule of producers
  • experienced a gap in blocks of > 5 seconds (so they moved to our “waiting” mode)

Credit goes to @heifner for the find

#4972 created a different calling path into `producer_plugin_impl::calculate_next_block_time` where there was no pending block state.  As a result when the following conditions were met the code would dereference a null ptr:

* the node was a producer, who _had_ produced during this processes lifetime OR replayed a block where they produced (so they have watermark data)
* still in the active schedule of producers
* experienced a gap in blocks of > 5 seconds (so they moved to our “waiting” mode)

Credit goes to @heifner for the find
@heifner heifner merged commit b5c7394 into develop Aug 15, 2018
@heifner heifner deleted the feature/fix-null-ptr-on-waiting-producer branch August 15, 2018 17:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants