On 31 January 2018 at 17:30, Andres Rodriguez <[email protected]> wrote: > Don't want an overly large numBufferBarriers/numTextureBarriers to blow > up the stack. > > Suggested-by: Emil Velikov <[email protected]> > Signed-off-by: Andres Rodriguez <[email protected]> > --- Thanks for sorting this Andres.
> src/mesa/main/externalobjects.c | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/src/mesa/main/externalobjects.c b/src/mesa/main/externalobjects.c > index 463debd268..6a248f35a6 100644 > --- a/src/mesa/main/externalobjects.c > +++ b/src/mesa/main/externalobjects.c > @@ -727,34 +727,37 @@ _mesa_WaitSemaphoreEXT(GLuint semaphore, > > ASSERT_OUTSIDE_BEGIN_END(ctx); > > semObj = _mesa_lookup_semaphore_object(ctx, semaphore); > if (!semObj) > return; > > FLUSH_VERTICES(ctx, 0); > FLUSH_CURRENT(ctx, 0); > > - bufObjs = alloca(sizeof(struct gl_buffer_object **) * numBufferBarriers); > + bufObjs = malloc(sizeof(struct gl_buffer_object **) * numBufferBarriers); Through the patch, please check for malloc failure and _mesa_error(OOM)/free if so -Emil _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
