bug-bash
[Top][All Lists]
Advanced

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

Severe memleak in sequence expressions?


From: Marc Schiffbauer
Subject: Severe memleak in sequence expressions?
Date: Wed, 30 Nov 2011 13:33:15 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi all,

I think there is a severe memleak in bash.

I had this effect with bash 4.2.10 (Ubuntu Linux) as well as 
bash 4.1.9 on Gentoo Linux.

To make it short:

echo {0..10000000}>/dev/null

This makes my system starting to swap as bash will allocate several GiB of
memory.

If I choose a way bigger number bash "just" seems to crash:

mschiff@lisa ~ $ echo {1..1000000000000000000}>/dev/null
bash: xmalloc: cannot allocate 11892949016 bytes (135168 bytes allocated)
mschiff@lisa ~ $

Is this a bug?

Please do not try this on a productive machine!

-Marc
-- 
8AAC 5F46 83B4 DB70 8317  3723 296C 6CCA 35A6 4134

Attachment: pgpi3HgbQXljL.pgp
Description: PGP signature


reply via email to

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