[Mesa-dev] [PATCH] glsl: avoid stack smashing when there are too many attributes

Iago Toral itoral at igalia.com
Tue Mar 8 15:14:01 UTC 2016


On Tue, 2016-03-08 at 10:01 -0500, Ilia Mirkin wrote:
> On Tue, Mar 8, 2016 at 9:54 AM, Iago Toral <itoral at igalia.com> wrote:
> > On Sun, 2016-03-06 at 12:21 -0500, Ilia Mirkin wrote:
> >> This fixes a crash in
> >>
> >> dEQP-GLES3.functional.transform_feedback.array_element.separate.points.lowp_mat3x2
> >>
> >> and likely others. The vertex shader has > 16 input variables (without
> >> explicit locations), which causes us to index outside of the to_assign
> >> array.
> >>
> >> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> >> Cc: "11.1 11.2" <mesa-stable at lists.freedesktop.org>
> >> ---
> >>
> >> Not sure if this is the right thing or whether we should be making the to_assign array dynamically resizable. This definitely fixes the crashes though.
> >
> > FWIW, I had sent a similar patch about a year ago to fix this:
> > https://lists.freedesktop.org/archives/mesa-dev/2015-July/090121.html
> >
> > Not sure that it is any better...
> 
> Maybe a little? Sorry, didn't realize that a fix for this already
> existed... using max_index is probably a little bit better? I've
> already pushed my version, but feel free to do yours as a fixup. 

Sure, I can rebase the patch on top of yours and re-send.

> If
> you guys have additional useful patches that have remained unreviewed,
> it'd probably be good to ping people to review them every so often.
> These things are quickly forgotten, and if the author(s) don't push
> for inclusion, it will be lost forever.

Yeah I know, I had actually forgotten about this patch myself and only
remembered when I saw yours. Now that you mention it, I think there
might be a couple of other dEQP fixes that never got reviewed and at
some point we stopped pinging people to review them. It might be worth
it to bring them back once more just in case... I'll look into that.

Iago



More information about the mesa-dev mailing list