-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`DeviceBuffer` deallocation sometimes fails with a segfault. I wasn't able to create a minimal reproducer for now. However, a possible source for the problem is the way Cython releases the memory. Indeed the DeviceBuffer's `DeviceMemoryResource` appears to be sometimes released before the `device_buffer`. This causes a segfault in the the `device_buffer` deconstructor as the device memory resource pointer is set to null. The code of this PR seems to fix the issue. It makes use of a holder class that seem to allow proper ordering of the class members destructions. Authors: - Victor Lafargue (https://github.com/viclafargue) Approvers: - Ashwin Srinath (https://github.com/shwina) URL: #931
- Loading branch information
1 parent
8c5ed6a
commit 5a239d2
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters