js shell asserts on illegal option

RESOLVED FIXED in Firefox 47

Status

()

Core
JavaScript Engine
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: lth, Assigned: jonco)

Tracking

unspecified
mozilla47
Points:
---

Firefox Tracking Flags

(firefox47 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
$ dist/bin/js --gczeal=2 ~/moz/ta.js
Error: Invalid long option: --gczeal=2

[[ Help text is printed ]]

Assertion failure: !isspace(*it), at /home/lhansen/moz/mozilla-inbound/js/src/shell/jsoptparse.cpp:98
Segmentation fault
(Reporter)

Comment 1

2 years ago
Well, asserts -- but still not terribly desirable.
Summary: js shell segfaults on illegal option → js shell asserts on illegal option
(Assignee)

Comment 2

2 years ago
Created attachment 8723635 [details] [diff] [review]
bug1248352-shell-help

It seems the option parsing code can't handle blank lines in help text.  This patch relaxes some assertions which makes things work, although the text is still slightly mangled.
Assignee: nobody → jcoppeard
Attachment #8723635 - Flags: review?(jdemooij)
Comment on attachment 8723635 [details] [diff] [review]
bug1248352-shell-help

Review of attachment 8723635 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.
Attachment #8723635 - Flags: review?(jdemooij) → review+

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/f19129c21eb3
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Duplicate of this bug: 1281094
You need to log in before you can comment on or make changes to this bug.