Commit 3ef6d11
committed
[L0] fix waiting on non-owned native handle events
L0 adapter makes optimizations based on whether an event has
any external references. The adapter keeps track of this based
on a reference count. This reference count wasn't being properly
set when first creating an event based on a native handle, leading
to code incorrectly assuming that the event was internal and had
no external references, which ultimately led to segfaults.
This patch sets the refcount to 1 when first creating an event,
solving the problem. It also adds a missing null-check to make
user native handle events even work.1 parent 5d58871 commit 3ef6d11
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
625 | 625 | | |
626 | 626 | | |
627 | 627 | | |
628 | | - | |
| 628 | + | |
| 629 | + | |
629 | 630 | | |
630 | 631 | | |
631 | 632 | | |
632 | 633 | | |
633 | | - | |
634 | | - | |
| 634 | + | |
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| |||
782 | 782 | | |
783 | 783 | | |
784 | 784 | | |
| 785 | + | |
| 786 | + | |
785 | 787 | | |
786 | 788 | | |
787 | 789 | | |
| |||
0 commit comments