[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running bash under valgrind gives "invalid free()"

From: Reuben Thomas
Subject: Re: Running bash under valgrind gives "invalid free()"
Date: Thu, 13 Apr 2017 09:15:55 +0100

On 12 April 2017 at 17:58, Hanno Böck <address@hidden> wrote:
On Wed, 12 Apr 2017 14:59:26 +0100
Reuben Thomas <address@hidden> wrote:

> ​frequently, it's the only tool that shows up bugs of this sort, as
> it's rather more powerful than a debugging malloc library.)

Try address sanitizer, it's pretty reliable and finds even more bug
classes compared to valgrind. Just add -fsanitize=address to the CFLAGS.

If you can't reproduce the bug with asan I'd bet on a valgrind bug.

​Thanks very much for the recommendation (and to Chet); I'd not heard of it. Once I've fixed all the bugs I'm finding with valgrind, I'll go back and see what asan finds, and also see if it finds anything else, so I can see whether to run it as well or instead of valgrind.

Having confirmed Chet's analysis with a few printfs added to bash (i.e. just to check the address being allocated and the one complained about were the same) I've filed a bug report against valgrind: https://bugs.kde.org/show_bug.cgi?id=378732


reply via email to

[Prev in Thread] Current Thread [Next in Thread]