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

Added undefined throwing function. #17397

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bdrodes
Copy link
Contributor

@bdrodes bdrodes commented Sep 6, 2024

Functions with no body are assumed to potentially throw.

This PR is blocked by https://github.com/github/codeql-c-team/issues/2423, we first must address the unexplained loop IR inconsistency as this will increase those inconsistencies.

The prior PR 128053e adds an apparent inconsistency with respect to this PR by specifying explicit non-throwing functions. For SEH some of what have been marked as non-throwing actually do throw (e.g., memcpy may throw with respect to SEH). We will work on a separate PR to differentiate for SEH, but the prior PR doesn't involve IR so the inconsistency, to my understanding, wouldn't be noticed as this PR affects IR flow specifically.

@github-actions github-actions bot added the C++ label Sep 6, 2024
Comment on lines +11 to +14
/**
* Calls to functions in a try statement with no body
* are assumed to potentially (not unconditionally) throw anything.
*/

Check warning

Code scanning / CodeQL

Class QLDoc style. Warning

The QLDoc for a class should start with 'A', 'An', or 'The'.
…ceptionHandling.qll

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
@MathiasVP
Copy link
Contributor

FWIW, the relevant inconsistencies have now all been fixed 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants