Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 813219 - zsh gets in infinite loop when checking syntax
Summary: zsh gets in infinite loop when checking syntax
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: zsh
Version: 5.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: James Antill
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On:
Blocks: 928849
TreeView+ depends on / blocked
 
Reported: 2012-04-17 09:18 UTC by Sebastien Aime
Modified: 2018-11-28 21:14 UTC (History)
5 users (show)

Fixed In Version: zsh-4.2.6-9.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-30 23:20:15 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed patch (375 bytes, patch)
2012-05-17 07:54 UTC, mahaveer darade
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1337 0 normal SHIPPED_LIVE zsh bug fix update 2013-09-30 21:13:00 UTC

Description Sebastien Aime 2012-04-17 09:18:56 UTC
With zsh on rhel5, running a syntax check against the script below never terminates whereas with rhel6 it does terminate.

---/---
#!/bin/zsh
while (( $X < $Y ))
do
done
---/---

rhel5> zsh -n loop.sh
loop.sh:2: bad math expression: operand expected at `<  '
loop.sh:2: bad math expression: operand expected at `<  '
loop.sh:2: bad math expression: operand expected at `<  '
...
(infinite loop)

rhel6> zsh -n loop.sh 
loop.sh:2: bad math expression: operand expected at `<  '

It appears that with zsh version 4.2.6 condition '(($X < $Y))' is true whereas it's false with version 4.3.10 from rhel6. As a result script never terminates when executed with rhel5 zsh.

Comment 1 mahaveer darade 2012-05-17 07:54:04 UTC
Created attachment 585136 [details]
proposed patch

Comment 2 RHEL Program Management 2012-06-12 01:22:50 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 5 James Antill 2013-04-05 13:46:20 UTC
 The patch looks simple enough (I assume someone ported it, or just took it, from upstream?)

Comment 11 errata-xmlrpc 2013-09-30 23:20:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1337.html


Note You need to log in before you can comment on or make changes to this bug.