glsl/blob: Return false from grow_to_fit if we've ever failed
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 11 Oct 2017 20:32:45 +0000 (13:32 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 13 Oct 2017 04:47:06 +0000 (21:47 -0700)
commite03717efbd9493f91624bca86d730ef9abfdb324
tree190bbfb4be1602a51e2a3a06a636572ce0ecff43
parent7118851374074bd92887bfabd47ce39c9be412fd
glsl/blob: Return false from grow_to_fit if we've ever failed

Otherwise we could have a failure followed by a smaller write that
succeeds and get a corrupted blob.  If we ever OOM, we should stop.

v2 (Jason Ekstrand):
 - Initialize the new boolean member in create_blob

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: mesa-stable@lists.freedesktop.org
src/compiler/glsl/blob.c
src/compiler/glsl/blob.h