Skip to content

[SYCL] Catch exceptions thrown in destructors #14808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 2, 2024

Conversation

ianayl
Copy link
Contributor

@ianayl ianayl commented Jul 26, 2024

In the same vein as #14273, this PR prevents exceptions from leaking in additional destructors caught by Coverity.

I'd like to draw attention to device_impl.cpp however: A comment was left suggesting that exceptions in the device_impl destructor be added to the asynchronous exceptions list. Given that devices are usually destroyed during shutdown, adding exceptions to the exceptions list doesn't seem to make sense, as there would be nothing to handle the exceptions anyway.

However, if this understanding is incorrect, and I should still add exceptions to an asynchronous exceptions list, please let me know. Thanks!

@ianayl ianayl requested a review from a team as a code owner July 26, 2024 17:00
@ianayl ianayl requested a review from uditagarwal97 July 26, 2024 17:00
@uditagarwal97
Copy link
Contributor

Requesting additional review from @KseniyaTikhomirova regarding the device_impl change.

@ianayl ianayl temporarily deployed to WindowsCILock July 26, 2024 18:09 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 26, 2024 19:46 — with GitHub Actions Inactive
Copy link
Contributor

@KseniyaTikhomirova KseniyaTikhomirova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
regarding question about async exception: I agree that it probably has no sense to report async

@ianayl ianayl temporarily deployed to WindowsCILock July 30, 2024 13:40 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 30, 2024 14:18 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 31, 2024 14:34 — with GitHub Actions Inactive
@ianayl ianayl temporarily deployed to WindowsCILock July 31, 2024 15:37 — with GitHub Actions Inactive
@ianayl
Copy link
Contributor Author

ianayl commented Aug 1, 2024

@intel/llvm-gatekeepers This PR is ready, thanks in advance!

@martygrant martygrant merged commit c52a633 into intel:sycl Aug 2, 2024
15 checks passed
AlexeySachkov pushed a commit to AlexeySachkov/llvm that referenced this pull request Nov 26, 2024
In the same vein as intel#14273, this PR prevents exceptions from leaking in
additional destructors caught by Coverity.

I'd like to draw attention to `device_impl.cpp` however: A comment was
left suggesting that exceptions in the `device_impl` destructor be added
to the asynchronous exceptions list. Given that devices are usually
destroyed during shutdown, adding exceptions to the exceptions list
doesn't seem to make sense, as there would be nothing to handle the
exceptions anyway.

However, if this understanding is incorrect, and I should still add
exceptions to an asynchronous exceptions list, please let me know.
Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants