Last Comment Bug 782087 - IonMonkey: Assertion failure: [infer failure] Missing type pushed 0: float, at jsinfer.cpp:327
: IonMonkey: Assertion failure: [infer failure] Missing type pushed 0: float, a...
Status: RESOLVED FIXED
[jsbugmon:update][ion:p1:fx18]
: assertion, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86_64 Linux
: -- major (vote)
: ---
Assigned To: David Anderson [:dvander]
: general
Mentors:
Depends on:
Blocks: langfuzz IonFuzz
  Show dependency treegraph
 
Reported: 2012-08-11 18:53 PDT by Christian Holler (:decoder)
Modified: 2013-01-14 07:43 PST (History)
7 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (6.51 KB, patch)
2012-08-14 15:05 PDT, David Anderson [:dvander]
no flags Details | Diff | Review
with typo fixed (6.95 KB, patch)
2012-08-14 15:06 PDT, David Anderson [:dvander]
sstangl: review+
Details | Diff | Review

Description Christian Holler (:decoder) 2012-08-11 18:53:56 PDT
The following testcase asserts on ionmonkey revision f1764bf06b29 (run with --ion -n):


test();
function test() {
    var n = 1000000;
    var start = new Date();
    var mceil = Math.floor;
    for (i = 3; i<= n; i+=2) {}
    var end = mceil  ();
    var timetaken = end - start;
    timetaken = timetaken / 1000;
    return timetaken;
}
Comment 1 David Anderson [:dvander] 2012-08-14 15:05:23 PDT
Created attachment 651900 [details] [diff] [review]
fix

The bug is that "double" may not be in the typeset for a call's return value, but we aggressively fold Math.floor() and friends to return a NaN. This patch just removes all this folding since it doesn't appear to occur in benchmarks anyway.
Comment 2 David Anderson [:dvander] 2012-08-14 15:06:22 PDT
Created attachment 651903 [details] [diff] [review]
with typo fixed
Comment 3 Sean Stangl [:sstangl] 2012-08-14 15:09:32 PDT
Comment on attachment 651903 [details] [diff] [review]
with typo fixed

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

::: js/src/ion/MCallOptimize.cpp
@@ +426,5 @@
>      if (constructing)
>          return InliningStatus_NotInlined;
>  
> +    if (argc != 2)
> +        return InliningStatus_NotInlined;

This can be "< 2".
Comment 4 David Anderson [:dvander] 2012-08-14 19:12:56 PDT
I kept != 2 to be strict about what we accept as optimizable.

https://hg.mozilla.org/projects/ionmonkey/rev/6a707a112b58
Comment 5 Christian Holler (:decoder) 2013-01-14 07:43:27 PST
A testcase for this bug was automatically identified at js/src/jit-test/tests/ion/bug782087.js.

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