[Mesa-dev] [PATCH] glsl: Remove unused ir_loop_jump::loop pointer.

Eric Anholt eric at anholt.net
Mon Jul 2 09:18:17 PDT 2012

Kenneth Graunke <kenneth at whitecape.org> writes:

> Commit 0c005bd7 intended to make ir_loop_jump::mode public, but also
> accidentally added a new pointer to the enclosing loop.  Furthermore, it
> tried to initialize the new field by adding "this->loop = loop;" to the
> constructor, but since there is no loop parameter, this only initialized
> the field to itself---so it will likely be a garbage pointer.
> A lot of code, such as lower_jumps, allocates new loop jumps without
> setting this field appropriately, so any uses would probably just crash.
> Thankfully, there were none, so we can just delete the field.
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51574
> Cc: Ian Romanick <ian.d.romanick at intel.com>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: thakis at chromium.org

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120702/2bd0e6c1/attachment.pgp>

More information about the mesa-dev mailing list