A subtle data race in Go
Analyzes a subtle data race bug in a Go web server middleware, explaining the cause and fix for a concurrency issue without typical synchronization constructs.
Philippe Gaultier is a software engineer and technical writer specializing in Go and C++. He focuses on debugging, concurrency, DTrace, and identifying subtle bugs and performance issues in complex applications.
54 articles from this blog
Analyzes a subtle data race bug in a Go web server middleware, explaining the cause and fix for a concurrency issue without typical synchronization constructs.
Explores naming conventions for mutexes in Go codebases and introduces structural search tools like ast-grep to analyze patterns.
A technical guide on enabling Position Independent Executable (PIE) builds in Go for security hardening, covering the process and troubleshooting dynamic linking issues.
A technical guide on using Bpftrace to profile a Go service's in-memory cache and estimate memory usage by analyzing entry sizes at runtime.
A developer details the process of optimizing their custom static blog generator, achieving a 33x speed improvement by analyzing and refactoring inefficient Git operations.
A developer shares a solution for installing Go tools with a specific version to resolve a staticcheck version mismatch error.
A developer details optimizing a debug build of a C torrent client, achieving 100x speedup by implementing SIMD and SHA hardware acceleration.
A developer shares solutions to common pain points and limitations encountered when using CGO, Go's FFI mechanism, to interface with C and Rust libraries.
A Rust programming tip explaining how to add type annotations to match patterns when the compiler cannot infer types, with syntax examples.
A deep dive into the fragmented landscape of OS-level timer APIs across Windows, POSIX, and Unix variants, and the challenges of cross-platform development.
A deep dive into implementing a Unix tool with retry logic and timeouts, exploring multiple system-level approaches for waiting on child processes.
The author argues Rust needs a 'defer' keyword for safe resource cleanup, using a detailed FFI memory management example to illustrate the pain points.
A technical tip showing how to use AWK to convert CSV/TSV data into a human-readable markdown or HTML table for documentation.
A developer shares key insights and practical lessons from a successful, incremental rewrite of a C++ codebase to Rust.
Explores a common bug in C arena allocators and presents safer implementation strategies to prevent out-of-bounds writes.
A technical tip on using AWK to count lines of Rust source code while excluding test modules, focusing on practical command-line solutions.
A technique for simplifying interoperability between Rust and C++ by using standard layout classes and matching Rust structs.
A guide to cross-compiling Odin programs for Raspberry Pi Zero using musl libc, enabling static ARM64 builds from an x86_64 development machine.
A developer recreates Minesweeper from scratch using X11 and C, resulting in a tiny, statically linked executable as a critique of modern bloat.
A guide to successfully rewriting a legacy C++ codebase incrementally, focusing on safety and maintainability, with a case study on introducing Rust.