Martin Sebor


Articles by

Article

Use source-level annotations to help GCC detect buffer overflows

Explore three source-level annotations that you can use to help detect out-of-bounds accesses across function call boundaries in GCC 11.

Article

Detecting memory management bugs with GCC 11, Part 2: Deallocation functions

Explore more features in GCC 11 that can help detect dynamic memory bugs in C and C++, and learn about the compiler's limitations.

Article

Detecting memory management bugs with GCC 11, Part 1: Understanding dynamic allocation

Dynamic memory management bugs are hard to find and frequently targeted in C and C++ programs, but GCC 11's enhanced malloc attribute is here to help.

Article

The joys and perils of aliasing in C and C++, Part 2

In part 2 of this series, avoid aliasing restrictions with programming language exemptions and compiler extensions, and explore possible resulting problems.

Article

The joys and perils of C and C++ aliasing, Part 1

In part 1 of this series, explore C/C++ language restrictions, their challenges and pitfalls, and examples demonstrating their benefits in optimized code.

Article

Efficient string copying and concatenation in C

Martin Sebor looks at C string handling functions used to copy and concatenate strings and examines ways to improve their efficiency.

Article

Understanding GCC warnings, Part 2

This article focuses on flow-based warnings that have increasingly been implemented in what GCC calls the "middle end." Limitations of middle-end warnings are discussed, as are false positives in middle-end warnings and possible solutions.

Article

Understanding GCC warnings

This article sheds light on how warnings work in GCC, why some warnings are false, and when warnings might not be output. Also discussed are the trade-offs made when implementing checks in GCC.