[BusyBox 0003884]: msh bails out with "out of string space" error
bugs at busybox.net
bugs at busybox.net
Fri Jul 18 06:17:59 UTC 2008
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=3884
======================================================================
Reported By: psl
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 3884
Category: Other
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
======================================================================
Date Submitted: 06-27-2008 02:33 PDT
Last Modified: 07-17-2008 23:17 PDT
======================================================================
Summary: msh bails out with "out of string space" error
Description:
Hello,
I've tried the following simple script on the busybox' msh:
#!/bin/msh
while true; do
continue
done
Running the script, I've got the following:
# ./tt
out of string space
#
Apparently, there is some memory leak in the implementation of
the msh.
======================================================================
----------------------------------------------------------------------
vapier - 06-28-08 07:57
----------------------------------------------------------------------
this is a known issue ... but i dont think i ever opened a report on it
the way msh implements "continue" and such constructs does not unwind
allocated space until you exit the whole loop
i dont think it could be fixed without some sign rearchitecting of the
code
----------------------------------------------------------------------
avn - 07-17-08 23:17
----------------------------------------------------------------------
The attached patch fixes this issue on top of trunk.
The fix is to restore the "area number" after longjmp-ing from brkcont()
and free the space allocated by nested execute(). The allocations of the
nested execute() bear an area number one higher than the current area
number.
Issue History
Date Modified Username Field Change
======================================================================
06-27-08 02:33 psl New Issue
06-27-08 02:33 psl Status new => assigned
06-27-08 02:33 psl Assigned To => BusyBox
06-28-08 07:57 vapier Note Added: 0008644
07-17-08 23:15 avn File Added: 3884.diff
07-17-08 23:17 avn Note Added: 0009724
======================================================================
More information about the busybox-cvs
mailing list