Quick Start - Coderrect Scanner

specifically designed for multithreaded software

Install Coderrect

Run these command to download and install Coderrect:

$ wget https://public-installer-pkg.s3.us-east-2.amazonaws.com/coderrect-linux-1.1.3.tar.gz
$ tar xf coderrect-linux-1.1.3.tar.gz
$ export PATH=$PWD/coderrect-linux-1.1.3/bin:$PATH

Jump Start Examples

Detect race conditions in hello.c, which is provided in the “examples” directory under Coderrect installation:

$ coderrect gcc coderrect-linux-1.1.3/examples/hello/hello.c

Coderrect Basics

Below are the most basics you need to run Coderrect:

Detect race conditions in a single source file.

$ coderrect gcc -fopenmp coderrect-linux-1.1.3/examples/pi/pi.c 

Detect race conditions in a Makefile project.

$ cd path/to/your/project/ $ coderrect make

Detect race conditions with Ninja build.

$ coderrect ninja

Detect race conditions with a build script (for example, build.sh).

$ coderrect ./build.sh

Analyze a single binary (for example, hello) in a Makefile project.

$ coderrect -e hello make

Analyze all binaries in a Makefile project.

$ coderrect -analyzeAll make

Analyze a Makefile project in parallel.

$ coderrect make -j8

Generate a summary report in terminal in additional to the detailed html report

$ coderrect -t make

List of all Coderrect command line usages.

$ coderrect -h
usage: coderrect [options] [file|dir] 
-h, -help //Display this information 
-v, -version //Display versions of all components 
-t, -report.terminal //Generate the terminal-based report. 
-analyzeAll //Automatically analyze all executables
-openlib.optimal //Automatically infer and analyze all potential API functions
-e <executable>, -executable=<executable> //Specify the executable name. 
-o <report_dir>, -outputDir=<report_dir> //Specify the report folder. 
-c, -cleanbuild //Delete all intermediate files.
-mode=[default|fast|exhaust] //run coderrect in default/fast/exhaust mode
-showconf //Display effective value of all configurations. 

Tutorials to help you use Coderrect the first time

With Coderrect installed, this simple tutorial, which walks you through using Coderrect to detect race conditions in a simple single-file multi-thread C software program written using OpenMP.

You can find more tutorials here at tutorials, and find answers to some commonly asked questions at FAQ.

Learn about common configurations to deal with potential false positives and analyze a library.