Hi, I posted two patches for memory leaks in bash-3.0. One of them has made it into bash-3.1, but the other has not. Here is the missing one:
On Wed, Dec 07, 2005 at 06:10:07PM +0000, Tim Waugh wrote: > There is at least one memory leak in the read builtin in bash-3.0. To > demonstrate it, try this test case: > > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=173283#c10 > > There is a link to a file, nonblock.c, which you should compile like > 'make nonblock'. Then run the short script to see the problem. > > The problem comes about when stdin has O_NONBLOCK set. Here is the > fix: > > --- bash-3.0/builtins/read.def.read-memleak 2005-12-07 17:45:38.000000000 > +0000 > +++ bash-3.0/builtins/read.def 2005-12-07 17:45:39.000000000 +0000 > @@ -461,6 +461,7 @@ > if (retval < 0) > { > builtin_error (_("read error: %d: %s"), fd, strerror (errno)); > + run_unwind_frame ("read_builtin"); > return (EXECUTION_FAILURE); > } > #endif Tim. */
pgpjjvzU2xTEx.pgp
Description: PGP signature
_______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash