wlroots: backport patch for free() of ununitialized#212298
Merged
Conversation
This cherrypicks an upstream-but-unreleased commit for the following
build failure. Strangely, this warning is not emittted on x86_64.
FAILED: libwlroots.so.11.p/render_egl.c.o
gcc -Ilibwlroots.so.11.p -I. -I.. -Iinclude -I../include -Iprotocol -I../protocol -Irender/gles2/shaders -Irender/vulkan/shade
../render/egl.c: In function 'egl_init_display':
../render/egl.c:179:17: error: 'external_only' may be used uninitialized in this function [-Werror=maybe-uninitialized]
179 | free(external_only);
| ^~~~~~~~~~~~~~~~~~~
../render/egl.c:128:29: note: 'external_only' was declared here
128 | EGLBoolean *external_only;
| ^~~~~~~~~~~~~
../render/egl.c:178:17: error: 'modifiers' may be used uninitialized in this function [-Werror=maybe-uninitialized]
178 | free(modifiers);
| ^~~~~~~~~~~~~~~
../render/egl.c:127:27: note: 'modifiers' was declared here
127 | uint64_t *modifiers;
| ^~~~~~~~~
cc1: all warnings being treated as errors
Author
|
@ofborg eval |
Member
|
Is it a powerpc64le-linux-specific issue? Not seeing this on Hydra on aarch64-linux and x86_64-linux. |
Author
If you take a look at the code they are very obviously using an uninitialized variable. And they admit so and fix it in the patch that is backported here. The only mystery is why gcc doesn't produce a warning on x86_64 or aarch64. It should. |
wegank
approved these changes
Jan 26, 2023
Contributor
|
The patch does not apply for me: |
Member
|
@B4dM4n Sorry for the inconvenience! Reverted. @amjoseph-nixpkgs It looks like |
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.
Description of changes
This cherrypicks an upstream-but-unreleased commit for the following build failure. Strangely, this warning is not emittted on x86_64.
Things done