gcc LeakSanitizer doesn't work

Solution Verified - Updated -

Issue

This is with rhdevtoolset/3.0-rhel6 (i.e gcc4.9)

$ gcc -V
gcc version 4.9.1 20140922 (Red Hat 4.9.1-10) (GCC)

Problem: my simple program leaks memory. But
LeakSanitizer is silent.

Compile line:

g++ -fsanitize=address -static-libasan -g -o zzz zzz.C

When I run zzz, nothing gets printed.

Here is what should get printed:

https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer

Environment

Red Hat Developer Toolset 3.0 and later (GCC 4.9 and later).

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.