Skip to content
systemcoding.dev

Tag

c

362 posts

Flat illustration of parallel threads meeting at a mutex, with the C, Rust and Erlang logos.
Concurrency

Use OpenMP Tasks for Recursive Parallelism

Parallelize recursive C code such as Fibonacci and tree walks with OpenMP tasks, taskwait and a cutoff, and see why a task per call runs slower than serial.

7 min read
Flat illustration of a debugger stopped at a breakpoint beside the register values, with the C, GNU and LLVM logos.
Security

Fuzz a Binary File Parser With AFL++

Build a file parser with afl-clang-fast and AddressSanitizer, seed and run afl-fuzz 4.x, read the crashes directory and shrink a crash with afl-tmin.

8 min read
Flat illustration of a hex dump with one byte highlighted, with the C, Rust and Python logos.
Fundamentals

NaN, Infinity and Negative Zero Explained

Learn what IEEE 754 NaN, infinity and negative zero are, how they arise, why NaN is not equal to itself, and how to test for each safely in C.

7 min read
Flat illustration of a debugger stopped at a breakpoint beside the register values, with the C, LLVM and Linux logos.
Debugging

Start Debugging a C Program With LLDB

Compile a C program with clang -g, load it in LLDB, break on main, run, read the stop report, step with next and step, and quit. A first session with output.

8 min read