[Mesa-dev] [Bug 102308] segfault in glCompressedTextureSubImage3D

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Aug 19 16:11:20 UTC 2017


            Bug ID: 102308
           Summary: segfault in glCompressedTextureSubImage3D
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: haagch at frickel.club
        QA Contact: mesa-dev at lists.freedesktop.org

I was trying to make "high fidelity" work on mesa, but with my limited OpenGL
knowledge maybe the code is wrong.

This is the call in question:

It causes this loop in compressed_tex_sub_image() to fail:

The incoming texture has width x height 64x64.

Then as I understand it the texImage should be just a part of that texture,
however texImage->Width x texImage->Height is 64x64 too.

with that width and height, image_stride gets calculated to be 4096, which is
problematic, because imageSize was 4096 too.

So the loop ends up subtracting image_stride=4096 from imageSize=4096 six
times. Sometimes this segfaults, sometimes it runs into an assertion.

As I said, maybe the application code is wrong, but I think there is at least
some error checking in mesa missing.

valgrind also reported an invalid read in some maybe relevant code

You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170819/e416ad71/attachment.html>

More information about the mesa-dev mailing list