New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverity finding CID 170385, Uninitialized scalar field (UNINIT_CTOR) #293
Comments
Here's the fix. Keep in mind the union looks like this:
And the actual fix for the
The extra gyrations below ensure we access through
The above is more succinctly expressed as |
Cleared at Commit 584f2f2ad11edb08. There's some undefined behavior lurking here, around line 320:
Issue 31, BlumBlumShub validation fails under ARMEL, had this problem (exchanged in private emails with one of our maintainers and a GCC dev):
If I get a whiff that |
Coverity finding CID 170385 (1 of 1): Uninitialized scalar field (UNINIT_CTOR) in
integer.cpp
:In the call ctor above,
m_whole
andm_halfs
are different members of the same union. While Coverity is complaining we did not initializem_whole
becauseNATIVE_DWORD
is in effect, there's a bigger problem lurking: undefined behavior when accessing the inactive union members (m_halves.low
andm_halves.high
).The fix for
UNINIT_CTOR
finding below makes the undefined behavior more apparent.The text was updated successfully, but these errors were encountered: