Skip to content

Conversation

ludviggunne
Copy link
Collaborator

No description provided.

@firewave
Copy link
Collaborator

firewave commented Sep 8, 2025

For fuzzing crashes please add the file attached to the ticket to the test/cli/fuzz-crash folder.

* allow member access on user defined literals
* allow (tokens that look like) user defined literals in msvc asm blocks
Copy link

sonarqubecloud bot commented Sep 8, 2025

@@ -0,0 +1 @@
_ 1p; No newline at end of file
Copy link
Owner

Choose a reason for hiding this comment

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

this is garbage code and ideally I think we would throw a syntaxError. That might prevent further crashes if the fuzzer tries more such garbage..

I don't know .. a + name literal statement might be garbage always?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Well the plus is just from the diff, and maybe the underscore could be an unknown macro? Either way i believe it should be a syntax error, afaik the suffix needs to begin with underscore, but maybe that should be its own ticket?

Copy link
Owner

Choose a reason for hiding this comment

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

Well the plus is just from the diff

ok understood.

Either way i believe it should be a syntax error, afaik the suffix needs to begin with underscore, but maybe that should be its own ticket?

as I understand it, user defined literals must start with underscore however library defined literals i.e. sv does not have to start with underscore.

Copy link
Collaborator

@firewave firewave Sep 24, 2025

Choose a reason for hiding this comment

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

I reckon it is just invalid. It also happens with variables names that start with a number - see https://trac.cppcheck.net/ticket/14152.

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