Skip to content

Conversation

@chrchr-github
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator

FYI https://trac.cppcheck.net/ticket/13707 is possibly related.

test/testsymboldatabase.cpp:5781:9: warning: Possible null pointer dereference: B [nullPointer]
        ASSERT(!B->type());
        ^
test/testsymboldatabase.cpp:5779:29: note: Assignment 'B=db?Token::findsimplematch(tokenizer.tokens(),"B < T , C >"):nullptr', assigned value is 0
        const Token *B = db ? Token::findsimplematch(tokenizer.tokens(), "B < T , C >") : nullptr;
                            ^
test/testsymboldatabase.cpp:5781:9: note: Null pointer dereference
        ASSERT(!B->type());
        ^

This might be caused by ASSERT*() not actually asserting. It was inconsistent and the implementation also caused problems in some cases so I dropped it as a whole. Please suppress it for now. I will take a look later.

@chrchr-github
Copy link
Collaborator Author

This might be caused by ASSERT*() not actually asserting. It was inconsistent and the implementation also caused problems in some cases so I dropped it as a whole. Please suppress it for now. I will take a look later.

I just copy-pasted from the test above. That one has a redundant check though.

@chrchr-github chrchr-github changed the title Fix #13498 assertion in getParentValueTypes (II) Fix #13498 assertion in getParentValueTypes (II) / #13707 fuzzing crash (assert) in getParentValueTypes() Mar 16, 2025
@chrchr-github chrchr-github merged commit bad59f0 into danmar:main Mar 17, 2025
60 checks passed
@chrchr-github chrchr-github deleted the chr_13498_II branch March 17, 2025 08:32
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.

2 participants