Skip to content

Port initialization fixes to prevent uninitialized memory access#8977

Open
laBobberto wants to merge 1 commit intoFirebirdSQL:masterfrom
laBobberto:fix_init_surgical
Open

Port initialization fixes to prevent uninitialized memory access#8977
laBobberto wants to merge 1 commit intoFirebirdSQL:masterfrom
laBobberto:fix_init_surgical

Conversation

@laBobberto
Copy link
Copy Markdown

This PR adds default initialization (= 0, = nullptr) to local variables in several core modules (Common, JRD, GPRE, Utilities). This fixes potential garbage value issues and uninitialized memory access warnings.

This PR is part of the closed parent PR #8938, which was split into smaller, focused pull requests.

@asfernandes
Copy link
Copy Markdown
Member

This is not a good path IMO, unless you really found a uninitialized path.
Double initialization in some paths to ensure every path initializes is worse than what we had.
Compilers can verify uninitialized paths and emit warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants