Bug 6170

Summary: hush bug : broken while
Product: Busybox Reporter: Denis.Ryndine
Component: OtherAssignee: unassigned
Status: RESOLVED FIXED    
Severity: critical CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Host: Target:
Build:

Description Denis.Ryndine 2013-04-05 12:42:52 UTC
BusyBox version
BusyBox v1.20.2 (2013-04-04 13:18:53 UTC) hush - the humble shell

This runs (not) as expected
while [ 3 -lt 3 ] ;  do echo running;  done

But this is infinite loop
while [ 3 -lt 3 ] && true ;  do echo running;  done
Comment 1 Denis.Ryndine 2013-04-05 13:20:20 UTC
[ 3 -lt 3 ]; echo $?
1
[ 3 -lt 3 ] && true; echo $?
1

So then seems broken while?
Comment 2 Denys Vlasenko 2013-04-07 16:18:58 UTC
Thanks for reporting it.

Fixed in git:

commit 3beab83e4f7f4213c185737e95dc4895f0059dd6
Author: Denys Vlasenko <vda.linux@googlemail.com>
Date:   Sun Apr 7 18:16:58 2013 +0200

    hush: fix for "while false && true; do echo BUG; break; done"