Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch
jitc_vcall_prepare()
allocation method to avoid deadlocks
The LLVM version of ``jitc_vcall_prepare()`` frees memory asynchronously by calling ``jit_free(0)`` from a nanothread task. The trouble is that we sometimes wait for tasks to finish while holding the Dr.Jit mutex, and this then leads to a deadlock when ``jitc_free()`` tries to acquire the lock. This commit circumvents the issue by switching the allocations over to ``malloc()``. This is not expected to have any major performance implications, since the allocations being done by this code path are small. The issue was already fixed on the ``nanothread_v2`` branch, and this simply propagates that fix.
- Loading branch information