On Sat, Apr 11, 2015 at 2:46 AM, Kenneth Graunke <kenn...@whitecape.org> wrote:
> new_prim was declared as a stack variable within a nested scope; we
> tried to retain a pointer to that data beyond the scope, which is bogus.
>
> GCC with -O1 eliminated most of the code that set new_prim's fields.
>
> Move the declaration to fix the bug.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81025
> Signed-off-by: Kenneth Graunke <kenn...@whitecape.org>
> Cc: Mark Janes <mark.a.ja...@intel.com>
> Cc: mesa-sta...@lists.freedesktop.org
> ---

Wow, yeah, that's awful.

Doesn't ib/new_ib suffer from the same problem?

With ib/new_ib fixed as well,

Reviewed-by: Matt Turner <matts...@gmail.com>

FWIW, Coverity [0] has known about this since Dec 2013. I really
recommend people use this. It'll send you emails about new defects,
which is often nice because you just reviewed that code and missed
something. :)

[0] https://scan.coverity.com/projects/139?tab=overview
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to