Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Nov 1, 2024

No description provided.

@firewave firewave requested a review from danmar November 1, 2024 15:06
@firewave
Copy link
Collaborator Author

firewave commented Nov 1, 2024

Uncovered by #6787. I think that upcoming PR might also double as a test for this so I did not add one.

@firewave
Copy link
Collaborator Author

firewave commented Dec 2, 2024

No feedback in over a month - merging.

@firewave firewave merged commit cd0022b into danmar:main Dec 2, 2024
60 checks passed
@firewave firewave deleted the addon-ctu branch December 2, 2024 05:43
std::string fileList;

if (files.size() >= 2 || endsWith(files[0], ".ctu-info")) {
// TODO: can this conflict when using -j?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we hit this issue in #6696.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's a bug with -j here.

If I run cppcheck with an addon and use the -j flag and cppcheck analyzes the same source file twice for any reason (could be because its compiled twice with different flags) then it dies with:

error: Bailing out from analysis: Checking file failed: Failed to execute addon 'misra' - exitcode is 1 [internalError]

--verbose shows output from the plugin like this that makes it seem like one of the xml artifact files is malformed
https://gist.github.com/andymacg/69ff6f79e01bee2c75afdb7f674762cd
However when I manually inspected the xml file, it parsed OK, so I think its a race condition where two threads overwrite the same file.

Copy link
Owner

Choose a reason for hiding this comment

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

I made a fix with #7082. But I am not sure how this can be tested effectively.

A unit test that ensures that the PID is part of the file list name? Or do you have any other suggestion?

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