Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for static and dynamic analyzer tools.
https://codechecker.readthedocs.io
Apache License 2.0
2.28k stars 383 forks source link

An error during Sorting analysis results #670

Closed liardety closed 5 years ago

liardety commented 7 years ago

Hello,

As I had many false positives from clang analyzer due to an custom assertion handler, I tried to add __attribute__((analyzer_noreturn)) at the end of its declaration. But then this error has shown up :

[ERROR] [14:51] - RequestFailed(_message="'NoneType' object has no attribute 'start_bugevent'", error_code=2)

gyorb commented 7 years ago

Hi,

Which CodeChecker version do you use?

liardety commented 7 years ago

I made a clone of this commit : 69837a5aa6f0a5df77a95c398468ac469e90c019 (SHA1 ID)

(Basicly I followed the instructions on the README.md)

gyorb commented 7 years ago

If you remove the extra attribute you added the analysis and storing the results is successful? In the analysis command did you use the same name CodeChecker check -b make -n myproject? Do you still get the error if you use a different name for the analysis?

gyorb commented 7 years ago

@liardety we found some issues on the current master branch which is under investigation. It might be connected to your problem. Could you try a previous more stable release v5.7.1?

gyorb commented 7 years ago

We made some updates on the master branch which might fix your storage problem, could you check it if you still get the error?

liardety commented 7 years ago

Hello,

The issue seems to be fixed with the recent updates (I don't get the error), thanks a lot. Yet, I still have many false positives around my custom assertion handler. I may be doing something not quite right.

whisperity commented 7 years ago

CodeChecker reads the Clang-generated plist files and parses them to create the reports that are stored in the database. To ensure no error happens from CodeChecker's end (hopefully this won't be broken again), you shouldn't take away keys from the generated plist XML, as CodeChecker depends on the plist being in a valid format.

The false positives from the custom assertion handler is a separate issue. Does using this custom handler involve passing different arguments to Clang SA? Is this in your code, or in the Clang Static Analyzer?

For extra arguments, you can create a text file and pass args via --saargs <txt file path>.

CodeChecker behaves as a front-end, assembling a proper clang invocation. (Use --verbose debug to see the exact analyzer invocation that is being fired for your source files.)

The analysis is done by Clang, and after it returns, we only take its output as it is, and work from it. The LLVM community's mailing lists might be a better place to ask about particular, analyzer-internal questions.

csordasmarton commented 5 years ago

I think this issue has been solved. Please feel free to reopen it if you still experience this problem.