forked from Ericsson/codechecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[report-converter][fix] Don't crash when we can't find the checker na…
…me for ubsan We forgot to inizialize `checker_name` to its default value, which lead to a read-before-assignment crash.
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../report-converter/tests/unit/analyzers/ubsan_output_test_files/ubsan1_nonmatching_msg.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
files/ubsan1.cpp:4:5: runtime error: This is not an actual error message, just tests whether we crash on a msg we don't associate with a checker. |
69 changes: 69 additions & 0 deletions
69
...eport-converter/tests/unit/analyzers/ubsan_output_test_files/ubsan1_nonmatching_msg.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>diagnostics</key> | ||
<array> | ||
<dict> | ||
<key>category</key> | ||
<string>unknown</string> | ||
<key>check_name</key> | ||
<string>UndefinedBehaviorSanitizer</string> | ||
<key>description</key> | ||
<string>This is not an actual error message, just tests whether we crash on a msg we don't associate with a checker.</string> | ||
<key>issue_hash_content_of_line_in_context</key> | ||
<string>253cc81796d3eccc4c6fa0c4ade5bb53</string> | ||
<key>location</key> | ||
<dict> | ||
<key>col</key> | ||
<integer>5</integer> | ||
<key>file</key> | ||
<integer>0</integer> | ||
<key>line</key> | ||
<integer>4</integer> | ||
</dict> | ||
<key>path</key> | ||
<array> | ||
<dict> | ||
<key>depth</key> | ||
<integer>0</integer> | ||
<key>kind</key> | ||
<string>event</string> | ||
<key>location</key> | ||
<dict> | ||
<key>col</key> | ||
<integer>5</integer> | ||
<key>file</key> | ||
<integer>0</integer> | ||
<key>line</key> | ||
<integer>4</integer> | ||
</dict> | ||
<key>message</key> | ||
<string>This is not an actual error message, just tests whether we crash on a msg we don't associate with a checker.</string> | ||
</dict> | ||
</array> | ||
<key>type</key> | ||
<string>ubsan</string> | ||
</dict> | ||
</array> | ||
<key>files</key> | ||
<array> | ||
<string>files/ubsan1.cpp</string> | ||
</array> | ||
<key>metadata</key> | ||
<dict> | ||
<key>analyzer</key> | ||
<dict> | ||
<key>name</key> | ||
<string>ubsan</string> | ||
</dict> | ||
<key>generated_by</key> | ||
<dict> | ||
<key>name</key> | ||
<string>report-converter</string> | ||
<key>version</key> | ||
<string>x.y.z</string> | ||
</dict> | ||
</dict> | ||
</dict> | ||
</plist> |