Mesa (main): i965: Explicitly abort instead of exiting on batch failure

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 29 13:52:09 UTC 2021


Module: Mesa
Branch: main
Commit: b077301a223ae05058c5a21d72acc8f91af9022c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b077301a223ae05058c5a21d72acc8f91af9022c

Author: byte[] <byteslice at airmail.cc>
Date:   Fri Jul  9 22:22:59 2021 -0400

i965: Explicitly abort instead of exiting on batch failure

This avoids a deadlock condition when registered atexit handlers attempt to
acquire a mutex, but the program was going to exit with an error anyway

Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Rohan Garg <rohan.garg at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11813>

---

 src/mesa/drivers/dri/i965/brw_batch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_batch.c b/src/mesa/drivers/dri/i965/brw_batch.c
index 989aef01cd6..c3c1267b0ad 100644
--- a/src/mesa/drivers/dri/i965/brw_batch.c
+++ b/src/mesa/drivers/dri/i965/brw_batch.c
@@ -862,7 +862,7 @@ submit_batch(struct brw_context *brw, int in_fence_fd, int *out_fence_fd)
    if (ret != 0) {
       fprintf(stderr, "i965: Failed to submit batchbuffer: %s\n",
               strerror(-ret));
-      exit(1);
+      abort();
    }
 
    return ret;



More information about the mesa-commit mailing list