-fsanitize=address should work – but I think you
need to create gfortran.dg/asan/asan.exp, e.g. by
copying gcc.dg/asan/asan.exp and adapting it.

That not only checks for double free but also for
instruments the code for use-after-free errors.

Cheers,

Tobias

On 4/29/20 9:23 PM, Thomas Koenig via Fortran wrote:

Hi,

I have a test case which does a double free on a pointer,
at runtime.  I have to narrow it down a bit before
comitting, but it indicates a regression.

Assuming I put this into the testsuite, how can I make sure
that this actually fails if the problem ever re-occurs?
Is there a combination of options and dejagnu statements
that will allow this?

It doesn't matter much if the failure is only on a single,
common platform. A x86_64-pc-linux-gnu solution would be enough
to find any regression there.

Regards

    Thomas

Reply via email to