[Top][All Lists]

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

Re: [Bug-readline] Memory leaks (identified with valgrind)

From: John Darrington
Subject: Re: [Bug-readline] Memory leaks (identified with valgrind)
Date: Sun, 6 Mar 2016 21:27:09 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Mar 06, 2016 at 03:20:16PM -0500, Chet Ramey wrote:
     On 3/6/16 7:56 AM, Timothe Litt wrote:
     > readline 6.3 under Fedora Linux.
     > (same failures with 6.2)
     > Any trivial program using readline leaks memory. 
     These are not leaks; this is simply allocated memory to which the
     application still has a handle when the program exits.

This may well be true.  But having these hanging around can mask other blocks
of allocated memory which really are leaks.

     > I suggest that readline establish an "atexit" function during 
     > that will cleanup... or  (less desirable) provide a suitable function
     > for the
     > application to call "atexit".

In fact, a library which calls atexit is highly undesireable.  The reason is, 
that if
your program also calls atexit (or another library you're linking against does) 
you have no control over which "atexit" payload gets called first.


Avoid eavesdropping.  Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

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