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

Fixup #4626 (Write about new checker in releasenotes) [skip ci] #7166

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danmar
Copy link
Owner

@danmar danmar commented Jan 2, 2025

No description provided.

@chrchr-github chrchr-github changed the title Fixup #4626 (Write about new checker in releasenotes) Fixup #4626 (Write about new checker in releasenotes) [skip ci] Jan 2, 2025
releasenotes.txt Outdated
@@ -1,7 +1,7 @@
Release Notes for Cppcheck 2.17

New checks:
-
- Check null pointer return from memory/resource allocation functions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe the new IDs nullPointerArithmeticOutOfMemory, nullPointerOutOfMemory, nullPointerOutOfResources should be mentioned.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like ctunullpointer reports warnings related to allocation failure under the same ID.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I can't see that ctunullpointer reports related warnings.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Here's an example from daca:

flashrom-1.4.0/layout.c:199:23: error: Null pointer dereference: filename [ctunullpointer]
flashrom-1.4.0/layout.c:214:42: note: Assuming allocation function fails
flashrom-1.4.0/layout.c:214:35: note: Calling function sanitise_filename, 1st argument is null
flashrom-1.4.0/layout.c:199:23: note: Dereferencing argument filename that is null

Copy link
Collaborator

Choose a reason for hiding this comment

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

I have created https://trac.cppcheck.net/ticket/13521 for that issue.

@firewave
Copy link
Collaborator

firewave commented Jan 2, 2025

We could probably generate a list of added IDs from the error messages output.

FYI To prevent the CI from running for the PR the individual commits also need [skip ci]. The one in the title is for the merged changes.

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.

3 participants