Round-trip change with ternary with parenthesized constant condition

VERIFIED FIXED in mozilla1.8.1

Status

()

P2
minor
VERIFIED FIXED
12 years ago
12 years ago

People

(Reporter: jruderman, Assigned: brendan)

Tracking

(Blocks: 1 bug, {regression, testcase, verified1.8.1})

Trunk
mozilla1.8.1
All
AIX
regression, testcase, verified1.8.1
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
Before the recent change to parenthesization, "(0) ? x : y" would stay the same through decompilation.  But now, the first decompilation removes the parens, and the second decompilation optimizes away the ternary due to the condition being 0.

js> function() { (0) ? x : y }
function () {
    0 ? x : y;
}

js> function () {
    0 ? x : y;
}
function () {
    y;
}
(Assignee)

Comment 1

12 years ago
Created attachment 237298 [details] [diff] [review]
trivial fix

Good for other fuzzer confounding tests that parenthesize constant conditions in if and ?:.

/be
Assignee: general → brendan
Status: NEW → ASSIGNED
Attachment #237298 - Flags: review?(mrbkap)
(Assignee)

Comment 2

12 years ago
Not worried about this, it's zero risk.  Willing to spend time on review and approval, then commit it to the branch, to get it out of the fuzzer's face.

/be
OS: Mac OS X 10.4 → AIX
Priority: -- → P2
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
Attachment #237298 - Flags: review?(mrbkap) → review+
(Assignee)

Comment 3

12 years ago
Fixed on trunk.

/be
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 4

12 years ago
Comment on attachment 237298 [details] [diff] [review]
trivial fix

This parentheses skipping is memoroy-safe, it's done elsewhere.  It will help avoid defuzzing the fuzzer. I think we should take it for 1.8.1.

/be
Attachment #237298 - Flags: approval1.8.1?

Comment 5

12 years ago
Comment on attachment 237298 [details] [diff] [review]
trivial fix

a=schrep for drivers.
Attachment #237298 - Flags: approval1.8.1? → approval1.8.1+
(Assignee)

Comment 6

12 years ago
Fixed on the 1.8 branch.

/be
Keywords: fixed1.8.1

Comment 7

12 years ago
Checking in regress-351693.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-351693.js,v  <--  regress-351693.js
initial revision: 1.1
done
Flags: in-testsuite+

Comment 8

12 years ago
verified fixed 1.8 1.9 20060909 window/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
You need to log in before you can comment on or make changes to this bug.