BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003884 [BusyBox] Other major always 06-27-08 02:33 07-20-08 16:03
Reporter psl View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0003884: 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.

Additional Information Reproduced on v 1.3.1, 1.7.1, and daily snapshot 27-Jun-2008, PowerPC port.
Attached Files  3884.diff [^] (745 bytes) 07-17-08 23:15

- Relationships

- Notes
(0008644)
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
 
(0009724)
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.
 
(0009864)
vda
07-20-08 16:03

Thanks for the patch! Seems to work. Applied in rev 22893.
 

- 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
07-20-08 16:03 vda Status assigned => closed
07-20-08 16:03 vda Note Added: 0009864
07-20-08 16:03 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker