Skip to content
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

SQLite3 desctrutor is declared as noexcept(true), but it can throw an exception #1686

Open
ppisar opened this issue Jan 16, 2025 · 1 comment
Labels
Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@ppisar
Copy link
Contributor

ppisar commented Jan 16, 2025

A static analyzer https://svashisht.fedorapeople.org/openscanhub/mass-scans/f42-13-Nov-2024/libdnf-0.73.3-1.fc42/scan-results.html#def18 found that ~SQLite3() destructor is implicitly declared as noexcept(true), but it calls SQLite3::close() which is implicitly noexcept(false) and it indeed throws Error objects.

Changing exception disposition breaks ABI, if I'm not mistaken.

Do we want to preserve ABI and hide the exceptions, or do want to allow the exceptions and change ABI?

@ppisar ppisar changed the title SQLite3 desctrutor is declared as noexcept(true), but it can throw an exception. SQLite3 desctrutor is declared as noexcept(true), but it can throw an exception Jan 16, 2025
@ppisar
Copy link
Contributor Author

ppisar commented Jan 16, 2025

DNF team recommends hiding the exceptions from the destructor.

@pkratoch pkratoch added the Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

2 participants