Closed
Bug 363173
Opened 19 years ago
Closed 17 years ago
compat problem: mozilla.in relies on traditional, non-POSIXish behavior of expr(1)
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: neuhauser, Unassigned)
References
Details
Attachments
(1 file)
|
1004 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060911 Red Hat/1.0.5-0.1.el4 SeaMonkey/1.0.5
Build Identifier: Mozilla XULRunner 1.8.0.4_0000000000
SUSv3 on expr(1):
Also note that this volume of IEEE Std 1003.1-2001 permits implementations to extend utilities. The expr utility permits the integer arguments to be preceded with a unary minus. This means that an integer argument could look like an option. Therefore, the conforming application must employ the "--" construct of Guideline 10 of the Base Definitions volume of IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines to protect its operands if there is any chance the first operand might be a negative integer (or any string with a leading minus).
that guideline is:
Guideline 10:
The argument -- should be accepted as a delimiter indicating the end of options. Any following arguments should be treated as operands, even if they begin with the '-' character. The -- argument should not be used as an option or as an operand.
http://www.freebsd.org/cgi/man.cgi?query=expr&apropos=0&sektion=0&manpath=FreeBSD+6.1-RELEASE&format=html
Reproducible: Always
Steps to Reproduce:
1. install xulrunner
2. run "xulrunner --version"
Actual Results:
roman@dagan ~ 1041:0 > expr --foo : '.*'
expr: illegal option -- -
usage: expr [-e] expression
Expected Results:
roman@dagan ~ 1042:2 > expr \( --foo : '.*' \)
5
| Reporter | ||
Comment 1•19 years ago
|
||
Comment 2•19 years ago
|
||
Confirming and setting status to new. This bug potentially
affects all systems which include strictly POSIX-compliant
implementations of expr.
Reassigning to the reporter since he attached what seems to
be a working patch.
The problem here is very similar to what we encountered
with Firefox back in 2004 (see bug #275438). On some
platforms setting the environment variable EXPR_COMPAT may
help to work around the problem.
Assignee: nobody → neuhauser
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: PC → All
Version: unspecified → Trunk
Comment 3•19 years ago
|
||
Comment on attachment 247987 [details] [diff] [review]
fixes expr(1) calls in mozilla.in used by xulrunner
The proposed changes seem to be safe and are even more portable regarding older systems than "expr -- ...".
Attachment #247987 -
Flags: first-review?(benjamin)
Updated•19 years ago
|
Attachment #247987 -
Flags: first-review?(benjamin) → first-review?(cls)
Attachment #247987 -
Flags: first-review?(cls) → review?(cls)
Attachment #247987 -
Flags: review?(cls)
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
Comment 4•17 years ago
|
||
This bug will (hopefully :-) be fixed by the fix for bug 461542.
Assignee: neuhauser → nobody
Comment 5•17 years ago
|
||
Fixed on trunk (1.9.1 should follow in a few days).
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•