[Mesa-dev] [PATCH] i965: Fix software primitive restart with indirect draws.
Matt Turner
mattst88 at gmail.com
Sat Apr 11 09:40:36 PDT 2015
On Sat, Apr 11, 2015 at 2:46 AM, Kenneth Graunke <kenneth at 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 <kenneth at whitecape.org>
> Cc: Mark Janes <mark.a.janes at intel.com>
> Cc: mesa-stable at 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 <mattst88 at 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
More information about the mesa-dev
mailing list