Skip to content

Add test for #13690 fuzzing crash (assert) in ErrorMessage::setmsg()#7989

Closed
chrchr-github wants to merge 1 commit intodanmar:mainfrom
chrchr-github:chr_test13690
Closed

Add test for #13690 fuzzing crash (assert) in ErrorMessage::setmsg()#7989
chrchr-github wants to merge 1 commit intodanmar:mainfrom
chrchr-github:chr_test13690

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

@sonarqubecloud
Copy link
Copy Markdown

@chrchr-github chrchr-github marked this pull request as draft November 28, 2025 10:29
@firewave
Copy link
Copy Markdown
Collaborator

FAILED test/cli/fuzz_test.py::test_fuzz_crash - AssertionError: assert {'crash-6d019f821f348d758d8d88bd7de692af6f9b07f4': ''} == {}
  
  Left contains 1 more item:
  {'crash-6d019f821f348d758d8d88bd7de692af6f9b07f4': ''}
  
  Full diff:
  - {}
  + {
  +     'crash-6d019f821f348d758d8d88bd7de692af6f9b07f4': '',
  + }

We need to store more information on how it failed.

failures[f] = stdout

That should possibly be stdout if stdout else stderr to hopefully get more information.

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

The assert also doesn't fire on Windows apparently.

@firewave
Copy link
Copy Markdown
Collaborator

The assert also doesn't fire on Windows apparently.

We only run it with a Release build and that has NDEBUG (explicitly) set and thus no asserts are generated. See also https://trac.cppcheck.net/ticket/10736.

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

The assert also doesn't fire on Windows apparently.

We only run it with a Release build and that has NDEBUG (explicitly) set and thus no asserts are generated. See also https://trac.cppcheck.net/ticket/10736.

Yeah, that's in the CI. But I can't reproduce it locally in Debug mode either.

@firewave
Copy link
Copy Markdown
Collaborator

Yeah, that's in the CI. But I can't reproduce it locally in Debug mode either.

Most likely related to differences in newline handling.

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

chrchr-github commented Nov 28, 2025

Yeah, that's in the CI. But I can't reproduce it locally in Debug mode either.

Most likely related to differences in newline handling.

Yes, the example has a 0xaat the end. But the issue needs to be fixed in simplecpp.

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