Get the latest tech news

Fun with -fsanitize=undefined and Picolibc


Both GCC and Clang support the -fsanitize=undefined flag which instruments the generated code to detect places where the program wanders into parts of the C language specification which are either undefined or implementation defined. Many of these are also common programming errors.

Both GCC and Clang support the -fsanitize=undefined flag which instruments the generated code to detect places where the program wanders into parts of the C language specification which are either undefined or implementation defined. As with the static analyzer adventure from last year, the vast bulk of sanitizer complaints came from invoking undefined or implementation-defined behavior in harmless ways: The undefined behavior sanitizers present in clang and gcc both provide useful diagnostics which uncover some common programming errors.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Fun

Fun

Photo of Picolibc

Picolibc

Related news:

News photo

It's fun making Studio Ghibli-style images with ChatGPT – but intellectual property is no laughing matter

News photo

Learning Assembly for Fun, Performance and Profit

News photo

Happy Hour Ban Is No Fun and Must End, a Cape Cod Lawmaker Says