-
-
Notifications
You must be signed in to change notification settings - Fork 23.6k
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable #91454
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a bunch more issues with uninitialized stuff in rendering code, would be good for the rendering team to make a pass on the reports and decide whether to init all the structs properly, or what other approach to take. We've had a number of bugs on some platforms/GPUs due to uninitialized struct members.
drivers/gles3/rasterizer_gles3.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @lawnjelly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I'm in the blame this is because I'm registered as initial author for 4.x, but this was copy pasted from 3.x GLES2, which is karrofel it looks like.
But fix looks fine to me. 👍
drivers/gles3/rasterizer_gles3.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed as the early return makes it dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scene/resources/2d/tile_set.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @groud
core/input/input.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it makes sense, I didn't notice that detail when changing the error message to a warning 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this should also fix these issues:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about these. To me it seems totally pointless to initialize certain variables when we don't know if they will be used. The trouble is that we assign an RID before configuring the light. So the Coverity scan doesn't have enough information here to be really useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed these changes from the PR for now.
thirdparty/enet/enet/godot.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @Faless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is C code so my fix was invalid, would need a different approach. Removed from this PR for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @rsubtil
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, expensive ended up never being set in the code, so this was actually causing undefined behavior.
I can confirm it should be false as AFAIK Godot still doesn't support partial/pagination behavior to requesting variables from stack dumps, so there's no point in hinting such behavior to DAP when Godot will already have all that information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There goes my little easter egg 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brought it back ;)
7e056c2 to
39b0ed1
Compare
…itialized scalar variable - Fixes godotengine#88630. - Fixes godotengine#92578.
39b0ed1 to
62120c7
Compare








Going through a few reports on https://scan.coverity.com/projects/godotengine-godot?tab=overview
Lots of low hanging fruits there to improve the code quality and find potential bugs.
The input mapping change fixes these issues: