bugzilla-daemon | 1 Apr 07:30 2012

[Bug 48141] New: [vmwgfx] src/gallium/auxiliary/util/u_inlines.h:256:pipe_buffer_map_range: Assertion `offset + length <= buffer->width0' failed.

https://bugs.freedesktop.org/show_bug.cgi?id=48141

             Bug #: 48141
           Summary: [vmwgfx]
                    src/gallium/auxiliary/util/u_inlines.h:256:pipe_buffer
                    _map_range: Assertion `offset + length <=
                    buffer->width0' failed.
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: critical
          Priority: medium
         Component: Other
        AssignedTo: mesa-dev <at> lists.freedesktop.org
        ReportedBy: vlee <at> freedesktop.org

mesa: 4123d0b32138a0fbdbc7f61380d041704ba0ad43 (master)

Run piglit draw-elements-base-vertex-bounds on vmwgfx.

$ ./bin/draw-elements-base-vertex-bounds -auto
src/gallium/auxiliary/util/u_inlines.h:256:pipe_buffer_map_range: Assertion
`offset + length <= buffer->width0' failed.

(gdb) bt
#0  0x00007fc24eedd7a1 in _debug_assert_fail (
    expr=0x7fc24fb2e978 "offset + length <= buffer->width0", 
(Continue reading)

bugzilla-daemon | 1 Apr 07:40 2012

[Bug 48142] New: [vmwgfx] rc/gallium/drivers/svga/svga_tgsi_decl_sm30.c:76:translate_vs_ps_semantic: Assertion `0' failed.

https://bugs.freedesktop.org/show_bug.cgi?id=48142

             Bug #: 48142
           Summary: [vmwgfx]
                    rc/gallium/drivers/svga/svga_tgsi_decl_sm30.c:76:trans
                    late_vs_ps_semantic: Assertion `0' failed.
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: Linux (All)
            Status: NEW
          Severity: critical
          Priority: medium
         Component: Other
        AssignedTo: mesa-dev <at> lists.freedesktop.org
        ReportedBy: vlee <at> freedesktop.org

mesa: 4123d0b32138a0fbdbc7f61380d041704ba0ad43 (master)

Run piglit clip-plane-transformation clipvert_pos on vmwgfx.

$ ./bin/clip-plane-transformation clipvert_pos -auto
src/gallium/drivers/svga/svga_tgsi_decl_sm30.c:76:translate_vs_ps_semantic:
Assertion `0' failed.
Trace/breakpoint trap (core dumped)

(gdb) bt
#0  0x00007f9b5d97a7a1 in _debug_assert_fail (expr=0x7f9b5e5c2e23 "0", 
    file=0x7f9b5e5c2de0 "src/gallium/drivers/svga/svga_tgsi_decl_sm30.c",
(Continue reading)

bugzilla-daemon | 1 Apr 08:15 2012

[Bug 48142] [vmwgfx] src/gallium/drivers/svga/svga_tgsi_decl_sm30.c:76:translate_vs_ps_semantic: Assertion `0' failed.

https://bugs.freedesktop.org/show_bug.cgi?id=48142

Vinson Lee <vlee <at> freedesktop.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[vmwgfx]                    |[vmwgfx]
                   |rc/gallium/drivers/svga/svg |src/gallium/drivers/svga/sv
                   |a_tgsi_decl_sm30.c:76:trans |ga_tgsi_decl_sm30.c:76:tran
                   |late_vs_ps_semantic:        |slate_vs_ps_semantic:
                   |Assertion `0' failed.       |Assertion `0' failed.

--

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
Vinson Lee | 1 Apr 08:17 2012

[PATCH] swrast: Fix memory leaks in blit_linear.

Fixes Coverity resource leak defects.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Vinson Lee <vlee <at> freedesktop.org>
---
 src/mesa/swrast/s_blit.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/swrast/s_blit.c b/src/mesa/swrast/s_blit.c
index 6d0b889..b0c56a4 100644
--- a/src/mesa/swrast/s_blit.c
+++ b/src/mesa/swrast/s_blit.c
 <at>  <at>  -566,6 +566,9  <at>  <at>  blit_linear(struct gl_context *ctx,
                                   GL_MAP_READ_BIT | GL_MAP_WRITE_BIT,
                                   &srcMap, &srcRowStride);
       if (!srcMap) {
+         free(srcBuffer0);
+         free(srcBuffer1);
+         free(dstBuffer);
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBlitFramebuffer");
          return;
       }
 <at>  <at>  -582,6 +585,9  <at>  <at>  blit_linear(struct gl_context *ctx,
 				  0, 0, readRb->Width, readRb->Height,
                                   GL_MAP_READ_BIT, &srcMap, &srcRowStride);
       if (!srcMap) {
+         free(srcBuffer0);
+         free(srcBuffer1);
+         free(dstBuffer);
(Continue reading)

nobled | 2 Apr 00:24 2012

[PATCH 1/9] util: fix undefined behavior

container_of() can legally return anything, even invalid addresses
that cause segfaults, when 'sample' is an uninitialized pointer.

Bug exposed by clang.

NOTE: This is a candidate for the 8.0 branch.
---
 src/gallium/auxiliary/util/u_double_list.h |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_double_list.h
b/src/gallium/auxiliary/util/u_double_list.h
index 2384c36..9d1129b 100644
--- a/src/gallium/auxiliary/util/u_double_list.h
+++ b/src/gallium/auxiliary/util/u_double_list.h
 <at>  <at>  -105,6 +105,11  <at>  <at>  static INLINE void list_delinit(struct list_head *item)
 #define LIST_IS_EMPTY(__list)                   \
     ((__list)->next == (__list))

+/**
+ * Cast from a pointer to a member of a struct back to the containing struct.
+ *
+ * 'sample' MUST be initialized, or else the result is undefined!
+ */
 #ifndef container_of
 #define container_of(ptr, sample, member)				\
     (void *)((char *)(ptr)						\
 <at>  <at>  -112,29 +117,29  <at>  <at>  static INLINE void list_delinit(struct list_head *item)
 #endif

(Continue reading)

nobled | 2 Apr 00:24 2012

[PATCH 2/9] util: fix uninitialized table

Most of the 256 values in the 'generic_to_slot' table were supposed to
be initialized with the default value 0xff, but were left at zero
(from CALLOC_STRUCT()) instead.

Noticed by clang:

u_linkage.h:60:31: warning: argument to 'sizeof' in 'memset' call is
the same expression as the destination;
      did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
   memset(table, 0xff, sizeof(table));
          ~~~~~               ^~~~~

Also fix a signed/unsigned comparison and a comment typo here.

NOTE: This is a candidate for the 8.0 branch.
---
 src/gallium/auxiliary/util/u_linkage.h   |    9 +++++----
 src/gallium/drivers/nvfx/nvfx_fragprog.c |    3 ++-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_linkage.h
b/src/gallium/auxiliary/util/u_linkage.h
index 43ec917..7b23123 100644
--- a/src/gallium/auxiliary/util/u_linkage.h
+++ b/src/gallium/auxiliary/util/u_linkage.h
 <at>  <at>  -49,15 +49,16  <at>  <at>  unsigned
util_semantic_set_from_program_file(struct util_semantic_set *set,
cons
  *
  * num_slots is the size of the layout array and hardware limit instead.
(Continue reading)

nobled | 2 Apr 00:24 2012

[PATCH 3/9] egl: fix uninitialized values

Noticed by clang:

eglimage.c:48:28: warning: argument to 'sizeof' in 'memset' call is
the same expression as the destination; did you mean to dereference
it? [-Wsizeof-pointer-memaccess]
   memset(attrs, 0, sizeof(attrs));
          ~~~~~            ^~~~~

NOTE: This is a candidate for the 8.0 branch.
---
 src/egl/main/eglimage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c
index d5deae7..1174d0a 100644
--- a/src/egl/main/eglimage.c
+++ b/src/egl/main/eglimage.c
 <at>  <at>  -45,7 +45,7  <at>  <at>  _eglParseImageAttribList(_EGLImageAttribs *attrs,
_EGLDisplay *dpy,

    (void) dpy;

-   memset(attrs, 0, sizeof(attrs));
+   memset(attrs, 0, sizeof(*attrs));
    attrs->ImagePreserved = EGL_FALSE;
    attrs->GLTextureLevel = 0;
    attrs->GLTextureZOffset = 0;
--

-- 
1.7.4.1
(Continue reading)

nobled | 2 Apr 00:24 2012

[PATCH 4/9] mesa: delete tautological compare

Noticed by clang:

main/extensions.c:934:14: warning: comparison of unsigned
expression < 0 is always false [-Wtautological-compare]
   if (index < 0)
       ~~~~~ ^ ~

Also don't cast away const needlessly in this function.
---
 src/mesa/main/extensions.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index b02a49d..6354ad3 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
 <at>  <at>  -931,14 +931,11  <at>  <at>  _mesa_get_enabled_extension(struct gl_context
*ctx, GLuint index)
    size_t n;
    const struct extension *i;

-   if (index < 0)
-      return NULL;
-
    base = (GLboolean*) &ctx->Extensions;
    n = 0;
    for (i = extension_table; i->name != 0; ++i) {
       if (n == index && base[i->offset]) {
-	 return (GLubyte*) i->name;
+	 return (const GLubyte*) i->name;
(Continue reading)

nobled | 2 Apr 00:24 2012

[PATCH 5/9] mesa: fix truncated value warning

Silences a clang warning:

format_pack.c:2546:30: warning: implicit conversion from 'int' to
'GLubyte' (aka 'unsigned char') changes value from 65535 to 255
[-Wconstant-conversion]
               d[i] = d[i] ? 0xffff : 0x0;
                           ~ ^~~~~~
---
 src/mesa/main/format_pack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/format_pack.c b/src/mesa/main/format_pack.c
index 85b2c69..9df9b14 100644
--- a/src/mesa/main/format_pack.c
+++ b/src/mesa/main/format_pack.c
 <at>  <at>  -2543,7 +2543,7  <at>  <at>  _mesa_pack_colormask(gl_format format, const
GLubyte colorMask[4], void *dst)
          if (bits == 8) {
             GLubyte *d = (GLubyte *) dst;
             for (i = 0; i < bytes; i++) {
-               d[i] = d[i] ? 0xffff : 0x0;
+               d[i] = d[i] ? 0xff : 0x0;
             }
          }
          else if (bits == 16) {
--

-- 
1.7.4.1
nobled | 2 Apr 00:24 2012

[PATCH 6/9] i965: fix typo

Noticed by clang:

brw_wm_surface_state.c:330:30: warning: initializer overrides prior
initialization of this subobject [-Winitializer-overrides]
      [MESA_FORMAT_Z24_S8] = 0,
                             ^
brw_wm_surface_state.c:326:30: note: previous initialization is here
      [MESA_FORMAT_Z24_S8] = 0,
                             ^
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 51d3a46..314e2e6 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
 <at>  <at>  -327,7 +327,7  <at>  <at>  brw_format_for_mesa_format(gl_format mesa_format)
       [MESA_FORMAT_S8_Z24] = 0,
       [MESA_FORMAT_Z16] = 0,
       [MESA_FORMAT_X8_Z24] = 0,
-      [MESA_FORMAT_Z24_S8] = 0,
+      [MESA_FORMAT_Z24_X8] = 0,
       [MESA_FORMAT_Z32] = 0,
       [MESA_FORMAT_S8] = 0,

--

-- 
1.7.4.1
(Continue reading)


Gmane