[Pkg-opencl-devel] Bug#848792: beignet: Beignet causes blender crash

Paul Wise pabs at debian.org
Tue Dec 27 00:47:26 UTC 2016


Forwarding from IRC:

<rnpalmer> Can someone forward http://paste.debian.net/904862/
(untested patch) to bug 848792 and its submitter?

When I loaded it, the paste contained this:

That hardware is much too old for beignet-opencl-icd to do anything
useful with (so you aren't losing anything by uninstalling it), but
*crashing* on such hardware is still a bug.

It is due to context creation failing while beignet is checking whether
the hardware is supported, so making this "return failure" instead of
"assert" (as below) will probably fix it, but this has *not* been
tested.  I expect to be able to test and push it before the freeze.

(The path "/home/geier/beignet" is the path the beignet source code was
in when it was compiled into the beignet* packages: it is normal to see
such nonexistent-on-your-machine paths when using a debugger on Debian
packages.)

--- a/src/intel/intel_driver.c
+++ b/src/intel/intel_driver.c
@@ -133,30 +133,29 @@
   return 1;
 }
 
-static void
+static int
 intel_driver_context_init(intel_driver_t *driver)
 {
   driver->ctx = drm_intel_gem_context_create(driver->bufmgr);
-  assert(driver->ctx);
+  if(!driver->ctx) return 0;
+  return 1;
 }
 
 static void
 intel_driver_context_destroy(intel_driver_t *driver)
 {
   if(driver->ctx)
     drm_intel_gem_context_destroy(driver->ctx);
   driver->ctx = NULL;
 }
 
 static int
 intel_driver_init(intel_driver_t *driver, int dev_fd)
 {
   driver->fd = dev_fd;
   driver->locked = 0;
   pthread_mutex_init(&driver->ctxmutex, NULL);
 
   if (!intel_driver_memman_init(driver)) return 0;
-  intel_driver_context_init(driver);
+  if (!intel_driver_context_init(driver)) return 0;
 
 #if EMULATE_GEN
   driver->gen_ver = EMULATE_GEN;

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-opencl-devel/attachments/20161227/49b94c14/attachment.sig>


More information about the Pkg-opencl-devel mailing list