
Debug Your First Segfault With gdb and a Core Dump
Turn Segmentation fault (core dumped) into a line number: compile with -g, enable core files, open the core in gdb, and read the backtrace and variables.
Everything you need to level up your coding skills.

Turn Segmentation fault (core dumped) into a line number: compile with -g, enable core files, open the core in gdb, and read the backtrace and variables.

Decide who frees every heap block in C by naming owners and borrowers, marking transfers in function contracts, and following a few conventions that stop leaks.

Build a program that reads any number of integers from input, using malloc, calloc, realloc and free the right way, with the checks that prevent crashes.

See where C variables live: the stack for locals that vanish on return, the heap for data you free yourself. Learn the limits, costs and bugs of each.

Build a Windows named pipe server and client in C with CreateNamedPipeW, ConnectNamedPipe and message mode, handle a busy pipe and secure access to it.

Use WaitForSingleObject and WaitForMultipleObjects to block on events, threads, processes and mutexes, read the return codes and avoid the 64 handle limit.

Compare CreateThread and _beginthreadex on Windows, see why C runtime code should use the second, and pass arguments, return values and handles safely.

Learn what register_filesystem does, which file_system_type fields matter, how mount finds your type by name, and how to unregister it safely on module unload.

Open, create, read, write, append and seek files with CreateFileW, ReadFile and WriteFile, with share modes, dispositions and error codes explained.

Build a tiny kernel filesystem that exposes one read-only file, using simple_fill_super, get_tree_nodev and simple_read_from_buffer from libfs on Linux 6.12.

Start a program from C with CreateProcessW, quote the command line correctly, redirect its output to a file, wait with a timeout and avoid handle leaks.

Create an ext4 filesystem inside a plain file, read its superblock with dumpe2fs, and walk inodes and directories with debugfs without mounting anything.
We send one email when a new post is published. No spam.