IonMonkey: Crash building SSA for an infinite loop

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: dvander, Assigned: dvander)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 557955 [details] [diff] [review]
fix
Attachment #557955 - Flags: review?(sstangl)
Comment on attachment 557955 [details] [diff] [review]
fix

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

::: js/src/ion/IonBuilder.cpp
@@ +707,5 @@
>  
>      current = successor;
> +
> +    // An infinite loop (for (;;) { }) will not have a successor.
> +    if (!current)

Would prefer (!successor) for clarity.
Attachment #557955 - Flags: review?(sstangl) → review+
http://hg.mozilla.org/projects/ionmonkey/rev/1643eac86ad1

(re: nit, the !current .. return Ended pattern is really prevalent, it should probably actually be a helper and tail called.)
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.