2026

All posts

Preventing Segfaults in Shared Memory IPC: Using Semaphores to Signal Data Readiness

mmap() succeeding doesn't mean the data behind it is valid. A close look at the race where a reader touches shared memory before the writer is done, and how a semaphore closes it.

Safe Length-Based Data Sharing in C

Don't ask where the '\0' is. Ask how many bytes are valid. A progressive look at why strcpy() fails on shared data, and how length-delimited buffers fix it.