[Bug 38327] New: Uninitialized matrix
https://bugs.winehq.org/show_bug.cgi?id=38327 Bug ID: 38327 Summary: Uninitialized matrix Product: Wine Version: 1.7.39 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs(a)winehq.org Reporter: isakov-sl(a)bk.ru Distribution: --- I got warning ----- glsl_shader.c: In function ‘shader_glsl_load_constants’: glsl_shader.c:799: warning: ‘temp._44’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._44’ was declared here glsl_shader.c:799: warning: ‘temp._43’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._43’ was declared here glsl_shader.c:799: warning: ‘temp._42’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._42’ was declared here glsl_shader.c:799: warning: ‘temp._41’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._41’ was declared here glsl_shader.c:799: warning: ‘temp._34’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._34’ was declared here glsl_shader.c:799: warning: ‘temp._24’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._24’ was declared here glsl_shader.c:799: warning: ‘temp._14’ is used uninitialized in this function glsl_shader.c:744: note: ‘temp._14’ was declared here ---- this is a function --- /* Taken and adapted from Mesa. */ static BOOL invert_matrix_3d(struct wined3d_matrix *out, const struct wined3d_matrix *in) { float pos, neg, t, det; struct wined3d_matrix temp; ... *out = temp; --- The function is for matrix 3x3 while wined3d_matrix is 4x4. But local variable (temp) is not initialized and may contain arbitrary values. Should the matrix to be zeroed explicitly or there must be function to invert 4x4 matrix? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral(a)gmail.com --- Comment #1 from Matteo Bruni <matteo.mystral(a)gmail.com> --- Those values are not really used so it doesn't matter in practice. I don't get those warnings, what compiler / version are you using? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 --- Comment #2 from Sergey Isakov <isakov-sl(a)bk.ru> --- (In reply to Matteo Bruni from comment #1)
Those values are not really used so it doesn't matter in practice. I don't get those warnings, what compiler / version are you using?
Apple's gcc-4.2.1 with -Os optimization. Without optimization there are no such warning. (?) Anyway those values are influences on inverted matrix. If you want I can write invert_matrix_4x4. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 Matteo Bruni <matteo.mystral(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS|Linux |Mac OS X --- Comment #3 from Matteo Bruni <matteo.mystral(a)gmail.com> --- (In reply to Sergey Isakov from comment #2)
(In reply to Matteo Bruni from comment #1)
Those values are not really used so it doesn't matter in practice. I don't get those warnings, what compiler / version are you using?
Apple's gcc-4.2.1 with -Os optimization. Without optimization there are no such warning. (?)
What does happen with the default -O2?
Anyway those values are influences on inverted matrix. If you want I can write invert_matrix_4x4.
They are ignored on purpose, I'm following the GL behavior. I just thought about one testcase which should confirm that D3D does the same, I'm going to test that and send a fix if I'm wrong. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 --- Comment #4 from Sergey Isakov <isakov-sl(a)bk.ru> --- Yes, I see really 3x3 used. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 --- Comment #5 from Sergey Isakov <isakov-sl(a)bk.ru> --- (In reply to Matteo Bruni from comment #3)
(In reply to Sergey Isakov from comment #2)
(In reply to Matteo Bruni from comment #1)
Those values are not really used so it doesn't matter in practice. I don't get those warnings, what compiler / version are you using?
Apple's gcc-4.2.1 with -Os optimization. Without optimization there are no such warning. (?)
What does happen with the default -O2?
I see in WIKI --- J. Huk: [feb 10] "-O2" is consider safe for most software "-O3" is not - from my experience, wine will [crash] with most apps, when compiled with "-O3" --- But this is very old advice. For me -Os works fine in all cases. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 --- Comment #6 from Matteo Bruni <matteo.mystral(a)gmail.com> --- I'm just asking if you still get warnings with the default -O2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 --- Comment #7 from Sergey Isakov <isakov-sl(a)bk.ru> --- Never saw before -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 Sergey Isakov <isakov-sl(a)bk.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WONTFIX --- Comment #8 from Sergey Isakov <isakov-sl(a)bk.ru> --- Not important -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED Resolution|WONTFIX |INVALID --- Comment #9 from Nikolay Sivov <bunglehead(a)gmail.com> --- Closing. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=38327 --- Comment #10 from Sergey Isakov <isakov-sl(a)bk.ru> --- I think status of this bug must be WONT FIX because compiler warnings present. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org