Skip to content

[SYCL] no exceptions leaking from destructors #14273

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 4 commits into from
Jul 1, 2024

Conversation

cperkinsintel
Copy link
Contributor

@cperkinsintel cperkinsintel commented Jun 25, 2024

Destructors are implicitly noexcept, so we must ensure they don't actually throw exceptions. No change to API or ABI with this PR.

@cperkinsintel cperkinsintel changed the title no throwing in destructors [SYCL] no throwing in destructors Jun 26, 2024
@cperkinsintel cperkinsintel changed the title [SYCL] no throwing in destructors [SYCL] no exceptions leaking from destructors Jun 26, 2024
@cperkinsintel cperkinsintel marked this pull request as ready for review June 27, 2024 15:11
@cperkinsintel cperkinsintel requested review from a team as code owners June 27, 2024 15:11
…le by main{try/catch}. So moving them to logging as well.
Copy link
Contributor

@uditagarwal97 uditagarwal97 left a comment

Choose a reason for hiding this comment

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

SYCL changes LGTM.

@cperkinsintel
Copy link
Contributor Author

ping to someone on @intel/syclcompat-lib-reviewers team

Copy link
Contributor

@joeatodd joeatodd left a comment

Choose a reason for hiding this comment

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

syclcompat changes LGTM 👍 thanks!

@againull againull merged commit 3040061 into intel:sycl Jul 1, 2024
14 checks passed
KseniyaTikhomirova pushed a commit to KseniyaTikhomirova/llvm that referenced this pull request Jul 1, 2024
Destructors are implicitly noexcept, so we must ensure they don't
actually throw exceptions. No change to API or ABI with this PR.
martygrant pushed a commit that referenced this pull request Aug 2, 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!
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.

5 participants