https://bugs.freedesktop.org/show_bug.cgi?id=37648
Summary: Logic error in mesa/main/teximage.c:texsubimage Product: Mesa Version: git Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium Component: Mesa core AssignedTo: mesa-dev@lists.freedesktop.org ReportedBy: rsle...@chromium.org This was reported by a static analyzer tool run against the Chromium projects, which make use of Mesa. The downstream bug is http://code.google.com/p/chromium/issues/detail?id=84134 The original bug was reported against the Mesa used by Chromium, which is Mesa 7.6, and is as follows: V501 There are identical sub-expressions to the left and to the right of the '&&' operator: width > 0 && height > 0 && height > 0 mesa teximage.c 2801 void GLAPIENTRY _mesa_TexSubImage3D(...) { ... else if (width > 0 && height > 0 && height > 0) { ... } However, this bug also exists in HEAD at http://cgit.freedesktop.org/mesa/mesa/tree/src/mesa/main/teximage.c#n2696 in the refactored method: static void texsubimage(...) { ... else if (width > 0 && height > 0 && height > 0) { /* If we have a border, offset=-1 is legal. Bias by border width. */ ... } The issue is the additional height > 0 check. I'm uncertain if this is a redundant check, and can be eliminated, or if it should be checking depth > 0 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev