Re: [Intel-gfx] [PATCH i-g-t 5/8] tests/i915/gem_exec_capture: Check for memory allocation failure

2021-11-03 Thread John Harrison
On 11/3/2021 07:00, Tvrtko Ursulin wrote: On 22/10/2021 00:40, john.c.harri...@intel.com wrote: From: John Harrison The sysfs file read helper does not actually report any errors if a realloc fails. It just silently returns a 'valid' but truncated buffer. This then leads to the decode of the

Re: [Intel-gfx] [PATCH i-g-t 5/8] tests/i915/gem_exec_capture: Check for memory allocation failure

2021-11-03 Thread Tvrtko Ursulin
On 22/10/2021 00:40, john.c.harri...@intel.com wrote: From: John Harrison The sysfs file read helper does not actually report any errors if a realloc fails. It just silently returns a 'valid' but truncated buffer. This then leads to the decode of the buffer failing in random ways. So, add a

Re: [Intel-gfx] [PATCH i-g-t 5/8] tests/i915/gem_exec_capture: Check for memory allocation failure

2021-10-28 Thread Matthew Brost
On Thu, Oct 21, 2021 at 04:40:41PM -0700, john.c.harri...@intel.com wrote: > From: John Harrison > > The sysfs file read helper does not actually report any errors if a > realloc fails. It just silently returns a 'valid' but truncated > buffer. This then leads to the decode of the buffer failing

[Intel-gfx] [PATCH i-g-t 5/8] tests/i915/gem_exec_capture: Check for memory allocation failure

2021-10-21 Thread John . C . Harrison
From: John Harrison The sysfs file read helper does not actually report any errors if a realloc fails. It just silently returns a 'valid' but truncated buffer. This then leads to the decode of the buffer failing in random ways. So, add a check for ENOMEM being generated during the read.