Grazvydas Ignotas
b9e92334f7
util/disk_cache: don't deadlock on premature EOF
...
If we get EOF earlier than expected, the current read loops will
deadlock. This may easily happen if the disk cache gets corrupted.
Fix it by using a helper function that handles EOF.
Steps to reproduce (on a build with asserts disabled):
$ glxgears
$ find ~/.cache/mesa/ -type f -exec truncate -s 0 '{}' \;
$ glxgears # deadlock
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com >
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
2017-03-25 13:08:37 +11:00
..
2017-03-15 11:15:53 +00:00
2016-05-25 09:41:44 -07:00
2016-05-25 09:41:44 -07:00
2017-03-22 17:52:23 +00:00
2017-03-13 11:16:34 +00:00
2017-03-13 11:16:34 +00:00
2016-03-24 15:20:44 -07:00
2017-03-17 07:34:26 +02:00
2017-03-22 16:55:22 +00:00
2016-11-22 18:05:51 +01:00
2016-11-22 18:05:51 +01:00
2015-11-24 10:02:55 -05:00
2015-11-24 10:05:32 -08:00
2017-03-25 13:08:37 +11:00
2017-03-24 11:20:09 +11:00
2017-03-22 16:55:22 +00:00
2016-08-05 09:07:04 -07:00
2015-11-27 10:55:22 +01:00
2017-03-10 14:12:48 +00:00
2015-10-16 19:33:37 -04:00
2015-10-16 19:33:37 -04:00
2016-08-22 07:37:55 +03:00
2016-09-12 10:48:35 +10:00
2017-01-12 13:58:32 +11:00
2016-11-21 12:44:46 -06:00
2017-03-03 12:09:08 +11:00
2017-03-23 08:16:29 +11:00
2017-03-22 11:33:51 +00:00
2017-03-22 11:33:51 +00:00
2017-03-06 11:28:48 -08:00
2017-02-27 15:46:12 -08:00
2017-03-23 08:16:29 +11:00
2017-03-23 08:16:29 +11:00
2015-08-19 04:17:49 +02:00
2017-03-22 16:55:22 +00:00
2014-09-17 11:27:25 +10:00
2014-09-17 11:27:25 +10:00
2015-03-18 21:06:26 -07:00
2016-08-17 12:53:20 -06:00
2017-01-18 19:07:23 +00:00
2016-02-02 14:42:32 -05:00
2015-01-15 13:21:27 -08:00
2015-01-28 16:33:34 -08:00
2016-10-07 21:24:50 +11:00
2016-10-05 15:40:40 +02:00
2016-09-12 10:48:35 +10:00
2016-09-12 10:48:35 +10:00
2017-03-22 16:55:23 +00:00
2015-06-29 09:06:40 -07:00
2015-06-29 09:06:40 -07:00
2014-09-17 11:27:25 +10:00
2015-12-04 14:06:41 +00:00
2016-10-05 15:39:39 +02:00
2016-09-13 10:04:13 +10:00
2017-03-12 17:49:03 +11:00
2017-03-13 09:50:26 +11:00
2017-03-12 17:43:06 +11:00
2017-03-13 12:23:11 +00:00
2016-10-19 09:05:25 +10:00
2016-11-11 07:59:29 +02:00
2016-11-17 12:03:24 -08:00
2017-03-15 08:22:02 +10:00