Last Comment Bug 684362 - IonMonkey: Crash building SSA for an infinite loop
: IonMonkey: Crash building SSA for an infinite loop
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: David Anderson [:dvander]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: 677337
  Show dependency treegraph
 
Reported: 2011-09-02 14:49 PDT by David Anderson [:dvander]
Modified: 2011-10-24 18:55 PDT (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (1.29 KB, patch)
2011-09-02 14:55 PDT, David Anderson [:dvander]
sstangl: review+
Details | Diff | Splinter Review

Description David Anderson [:dvander] 2011-09-02 14:49:23 PDT

    
Comment 1 David Anderson [:dvander] 2011-09-02 14:55:39 PDT
Created attachment 557955 [details] [diff] [review]
fix
Comment 2 Sean Stangl [:sstangl] 2011-09-02 15:05:34 PDT
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.
Comment 3 David Anderson [:dvander] 2011-09-02 16:13:53 PDT
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.)

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