On Tue, May 28, 2013 at 12:08:20PM -0700, Eric Anholt wrote: > Topi Pohjolainen <[email protected]> writes: > > +static void > > +fill_one_missing(const EGLint *all, EGLint *out, EGLint missing) > > +{ > > + unsigned i; > > + > > + for (i = 0; i < NUM_MANDATORY_ATTRS; ++i) { > > + if (all[2 * i] != missing) { > > + out[2 * i + 0] = all[2 * i + 0]; > > + out[2 * i + 1] = all[2 * i + 1]; > > + } > > + } > > + > > + out[i] = EGL_NONE; > > I think you meant to pack things into out[] with the missing attribute > skipped. As is, it looks like you overflow the out[] buffer on the > stack in the caller, and there's a hole in the middle with undefined > data passed in.
Thanks for spotting that, it looks that the test passed on blind luck. _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
