The production bug that made me care about undefined behavior
A developer recounts a production C++ bug caused by undefined behavior, explaining how uninitialized struct members led to a critical API error.
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.
45 articles from this blog
A developer recounts a production C++ bug caused by undefined behavior, explaining how uninitialized struct members led to a critical API error.
A technical guide on using DTrace to detect and analyze goroutine leaks in Go programs, including practical examples and script.
Using DTrace to dynamically list all HTTP routes registered in a Go application, useful for debugging and understanding runtime features.
A technical article exploring common and subtle causes of data races in Go programs, with real-world examples and fixes.
A technical guide on reproducing and fixing an I/O data race in Go using DTrace, including a minimal code reproducer and analysis.
A technical guide on using DTrace to inspect encrypted and compressed network traffic in Go programs for debugging purposes.
Using DTrace to determine if SQL files are accessed at build time or runtime in a Go application, focusing on I/O tracing.
Learn how to use DTrace to monitor and inspect live SQL queries, including their arguments, from a running Go application without code changes.
A look at a subtle bug in a Go test where a for loop iterates over an empty slice, and how static analysis tools miss it.
A developer investigates a subtle bug in Go's errgroup package, explaining the issue and providing a fix.
A developer shares a detailed debugging journey using Go profiling and DTrace to uncover and fix a performance bottleneck in a test suite.
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.