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

bugs at busybox.net bugs at busybox.net
Sat Mar 1 08:52:10 UTC 2008


A NOTE has been added to this issue. 
====================================================================== 
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:                     assigned
====================================================================== 
Date Submitted:             04-22-2006 13:18 PDT
Last Modified:              03-01-2008 00:52 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. 

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                          
======================================================================




More information about the busybox-cvs mailing list