bug-bash
[Top][All Lists]
Advanced

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

memory leak with changed environments


From: monetr
Subject: memory leak with changed environments
Date: Mon, 30 May 2005 13:35:32 +0200

Hello,
i lose memory when i execute the following script.
Without changed environment for test, no memory is lost.
Is this a bug or feature?

$ bash --version
GNU bash, version 2.05b.0(1)-release (i586-suse-linux)
Copyright (C) 2002 Free Software Foundation, Inc.

#!/bin/bash
# The first loop iterates infinitely over the bad code.
# The IFS=x causes the second loop to consume more and more memory.
# Should'nt this memory be freed, when the inner while statements terminates?
# No memory is lost when i remove IFS=x.
declare -i I=0
while true
do
  while IFS=x test "$I" -lt 10
  do 
    I=$I+1
  done
done

bye,
rainer
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193





reply via email to

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