Introduce Infer static analyzer to the CI pipeline
The Infer Docker Image in use is hosted on Docker Hub, which was built and pushed to sysprog21 by us since Infer's latest upstream release is very outdated at the time of writing.
The docker image size is around 470 MB, after numerous attempts to reduce its size from 3GB.
This PR also fixes issues reported by Infer. (The value written to &target_reg is never used.)
Skip Arm64 based host during static analysis.
I am unaware that the Arm64-based host will be run during the static analysis phase, as I didn't specify arch: aarch64. Or maybe I am mistaken?
The docker image size is around 470 MB, after numerous attempts to reduce its size from 3GB.
Can you rebuild Infer static analysis tool with -Os set? And then, strip the ELF files accordingly.
The docker image size is around 470 MB, after numerous attempts to reduce its size from 3GB.
Can you rebuild Infer static analysis tool with
-Osset? And then, strip the ELF files accordingly.
I can give this a try, but I have no guarantee on this.
If Clang scan-build already makes sense to CI, do we need Infer? Can you show the considerations?
The build-infer.sh invokes autogen.sh, which generates GNU Automake style scripts. At the moment, only C and Python are required for static analysis.
Reference: The Growth of the OCaml Distribution
The build-infer.sh invokes
autogen.sh, which generates GNU Automake style scripts. At the moment, only C and Python are required for static analysis.Reference: The Growth of the OCaml Distribution
The previous Docker Image contained only C and Python analysis capability, but now with the release build, Java is also included.
Based on prior experience, Java can be excluded by passing in parameters, but some changes to create_binary_release.sh will be required as I am now using create_binary_release.sh to build a standalone binary instead of invoking build-infer.sh directly like before.
The infer image pipeline broke recently (node11 now has strict internet bandwidth restrictions), and the effort to maintain an image is a bit cumbersome. Thus, closing this PR for now.