PoC of the rule CON31-C of SEI CERT C Coding Standard.
- You must have the "musl-gcc" compiler in order to compile "threads.h" library in UNIX systems:
sudo apt install musl-tools
- Clone the repo:
git clone https://github.com/Pitenager/CON31-C_POC.git
- Compile the source code:
musl-gcc concurrency.c -o concurrency -std=gnu11
- Execute the program:
./concurrency [0/1]
(0 = non compliant solution / 1 = compliant solution) - If you want to perform a quick analysis, you can run
perf stat ./concurrency [0/1]