-
Notifications
You must be signed in to change notification settings - Fork 385
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
Fb infer #4257
Fb infer #4257
Conversation
I've not tried it, but this integration should support the new 1.2.0 release of infer. |
c1c7a76
to
a797330
Compare
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.
Please check why the analysis does not work on postgresql
Please fix the description field of the infer checkers
There are other minor copy paste errors which you need to check
9f41048
to
1fc70e9
Compare
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.
please fix the postgresql and the xerces analysis and add the fb infer license file.
122aa6a
to
c2d5a96
Compare
5541091
to
c66d534
Compare
I retried this PR with infer 1.1.0. I could not list the checkers
and I could not execute the analysis either, I guess because it could not list checker.
I think the problem is that the timezone setting is incorrect for infer.
Could you please print the stderror from the analyzer tool in as CodeChecker error log when invocation of the tools fails? Or course when I set |
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.
-
Please see my previous comment to print analysis errors to error log.
-
Some valid reports seem to be lost
Analyzing postgresql latch.c
CodeChecker analyze ./compile_commands.json --analyzers infer -e infer -c --file "*/latch.c" -o ./reports_infer --verbose debug
INFO][2024-08-27 13:23:04] {analyzer} [2036841] <139720747276096> - analysis_manager.py:618 check() - [1/1] infer analyzed latch.c successfully.
[DEBUG_ANALYZER][2024-08-27 13:23:04] {analyzer} [2036841] <139720747276096> - analysis_manager.py:685 check() -
latch.c:790: error: Dead Store
The value written to &data (type char*) is never used.
788. #if defined(WAIT_USE_EPOLL)
789. set->epoll_ret_events = (struct epoll_event *) data;
790. data += MAXALIGN(sizeof(struct epoll_event) * nevents);
^
791. #elif defined(WAIT_USE_KQUEUE)
792. set->kqueue_ret_events = (struct kevent *) data;
latch.c:1502: error: Dead Store
The value written to &occurred_events (type WaitEvent*) is never used.
1500. set->events[set->latch_pos].user_data;
1501. occurred_events->events = WL_LATCH_SET;
1502. occurred_events++;
^
1503. returned_events++;
1504.
Found 2 issues
Issue Type(ISSUED_TYPE_ID): #
Dead Store(DEAD_STORE): 2
[DEBUG_ANALYZER][2024-08-27 13:23:04] {analyzer} [2036841] <139720747276096> - analysis_manager.py:686 check() -
Capturing in make/cc mode...
Found 1 source file to analyze in /workspace/test-projects/postgres/reports_infer/infer/cd8fc2fbba52d017ee60954632245ada
latch.c starting
latch.c DONE
but the report directory seems to be empty, however it should contain the dead store report from latch.c
CodeChecker parse ./reports_infer/
Found no defects in latch.c
----======== Summary ========----
---------------------------------------------
Number of processed analyzer result files | 1
Number of analyzer reports | 0
---------------------------------------------
----=================----
Also when I call
CodeChecker analyze ./compile_commands.json --analyzers infer -e infer -c --file "*/latch.c" -o ./reports_infer
what are these No source file found: latch.c warnings?
[INFO 2024-08-27 13:26] - Previous analysis results in '/workspace/test-projects/postgres/reports_infer' have been removed, overwriting with current result
[INFO 2024-08-27 13:27] - Enabled checker list can be found in /workspace/test-projects/postgres/reports_infer/metadata.json
[INFO 2024-08-27 13:27] - Starting static analysis ...
[WARNING 2024-08-27 13:27] - No source file found: latch.c
[WARNING 2024-08-27 13:27] - No source file found: latch.c
[INFO 2024-08-27 13:27] - [1/1] infer analyzed latch.c successfully.
[INFO 2024-08-27 13:27] - ----==== Summary ====----
[INFO 2024-08-27 13:27] - Successfully analyzed
[INFO 2024-08-27 13:27] - infer: 1
[INFO 2024-08-27 13:27] - Total analyzed compilation commands: 1
[INFO 2024-08-27 13:27] - Skipped compilation commands: 1272
[INFO 2024-08-27 13:27] - ----=================----
[INFO 2024-08-27 13:27] - Analysis finished.
[INFO 2024-08-27 13:27] - To view results in the terminal use the "CodeChecker parse" command.
[INFO 2024-08-27 13:27] - To store results use the "CodeChecker store" command.
[INFO 2024-08-27 13:27] - See --help and the user guide for further options about parsing and storing the reports.
[INFO 2024-08-27 13:27] - ----=================----
[INFO 2024-08-27 13:27] - Analysis length: 2.0951790809631348 sec.
5f5105b
to
42449f0
Compare
Infer 1.1.0 drops the following error if the timezone is not set to UTC:
This also means that the Please add the TZ=UTC environment variable where you invoke infer as a workaround.
like this, it works. |
b6e9a2c
to
ec2d0c9
Compare
Adding facebook infer analyzer support
FIXES #4189