[BusyBox 0000846]: msh - break/continue statement within nested loop causes hang or segfault

bugs at busybox.net bugs at busybox.net
Sat Mar 1 09:35:52 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=846 
====================================================================== 
Reported By:                John
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   846
Category:                   Other
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             04-22-2006 13:18 PDT
Last Modified:              03-01-2008 01:35 PST
====================================================================== 
Summary:                    msh - break/continue statement within nested loop
causes hang or segfault
Description: 
To be more exact, break/continue statement within nested loop causes hang
or segfault on 2nd/3rd/i.e. >1 iteration.
====================================================================== 

---------------------------------------------------------------------- 
 vda - 03-01-08 00:52  
---------------------------------------------------------------------- 
forkexec temporarily sets t->words to processed/expanded list of arguments
(I think), does its job, returns to execute(), and execute() restores
t->words. This scheme breaks horribly with "break" - it longjmps away out
of nested execute() call back to some previous execute(), which was
executing "while". Leaving break's t->words clobbered! On next iteration
"break" has wrong/corrupted t->words...

Fix: do not touch t->words, but separately pass wp as param list to
builtins. 

---------------------------------------------------------------------- 
 vda - 03-01-08 01:35  
---------------------------------------------------------------------- 
Fixed in rev 21144. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-22-06 13:18  John           New Issue                                    
04-22-06 13:18  John           Status                   new => assigned     
04-22-06 13:18  John           Assigned To               => BusyBox         
03-01-08 00:52  vda            Note Added: 0005544                          
03-01-08 01:35  vda            Status                   assigned => closed  
03-01-08 01:35  vda            Note Added: 0005554                          
======================================================================




More information about the busybox-cvs mailing list