-
Notifications
You must be signed in to change notification settings - Fork 417
[analyzer] Fix crash when an assembler command is analyzed #3914
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
Conversation
I am not sure if GCC would give you useful output without specifying language. |
If I'm a little worried, that if we skip the entire build action, just because we can't recognize the language due to some other potential bug then the analysis of that file would be silently skipped, even though the file could be analyzed anyways without What do you think? |
In this case it is nasm that is called, not GCC, and it is called without any file. I believe you are trying to find out default include paths here, how does that work - all unsupported Extension map map to none, first one gets called even if it is not GCC and you can't even parse the output? As for what I would be doing, for default includes stick to the languages (compilers?) you know, skip the rest. |
@nolange I created another implementation which doesn't call the implicit include path collector if the language is not recognized. The build action itself is skipped in this case even today, so only this crash should be eliminated. codechecker/analyzer/codechecker_analyzer/buildlog/log_parser.py Lines 1296 to 1297 in a07a74a
@whisperity Yes, it fixes that ticket too. I added it to the commit message. |
If an assember command is analyzed then the recognized language remains None which can't be provided after -x flag in a subprocess.Popen call. So -x is added to the command if the recognized language is not None. Fixes Ericsson#3670 Fixes Ericsson#3730
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small question
'directory': ''} | ||
|
||
res = log_parser.parse_options(action) | ||
print(res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this print necessary?
8000
I just copy-pasted it from the other test cases. I don't know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
If an assember command is analyzed then the recognized language remains None which can't be provided after -x flag in a subprocess.Popen call. So -x is added to the command if the recognized language is not None.
Fixes #3670
Fixes #3730