Repository navigation
Add NULL checks on bcb_bdb missing after CORE-6509 (4.0) - #9294
Open
gabrieleciech wants to merge 1 commit into
Open
gabrieleciech wants to merge 1 commit into
gabrieleciech wants to merge 1 commit into
Conversation
After a failed expand_buffers() bcb_count still includes uninitialised (NULL) descriptors. CORE-6509 added the check to flushAll() only; add it to CCH_down_grade_dbb(), CCH_flush_ast(), CCH_shutdown() and get_prec_walk_mark() as well. Refs FirebirdSQL#9289
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #9289 (4.0 part; the 3.0 part is a separate PR). NULL checks only, as suggested there.
CORE-6509 (e17dfa6) initialises the new tail of
bcb_rpttonullptrand checks it influshAll(), butbcb_countstill includes those entries. Other loops up tobcb_countdereferencebcb_bdbwithout a check.Change
Stop at the first NULL
bcb_bdb, asflushAll()already does, inCCH_down_grade_dbb(),CCH_flush_ast(),CCH_shutdown()(thecatchpath) andget_prec_walk_mark().CCH_shutdown()was not listed in #9289: it has the same pattern in the cleanup after a failedCCH_flush().Test
Compiled on Ubuntu 18.04, gcc 7.5 (
src/jrd/cch.cpp, Release flags +-Wall). No automated test, as for CORE-6509.