OdinMonkey: TryEnablingIon fails for arrow functions FFI call with --ion-eager

RESOLVED FIXED in mozilla24

Status

()

Core
JavaScript Engine
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: bbouvier, Assigned: bbouvier)

Tracking

(Blocks: 2 bugs)

unspecified
mozilla24
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
Created attachment 761821 [details] [diff] [review]
proposed fix

(function m(a,ffi){"use asm"; var f = ffi.f; function g(){f();}return g})(this, {f: x=>x})

raises an assertion failure as the arrow function has no script, in TryEnablingIon.
Present in a test case of bug 882012.
Attachment #761821 - Flags: review?(hv1989)

Comment 1

4 years ago
Don't forget to add the testcase to the patch.
(Assignee)

Comment 2

4 years ago
(In reply to Luke Wagner [:luke] from comment #1)
> Don't forget to add the testcase to the patch.

Should I move the test case present in the patch of bug 882012 in this patch?

Comment 3

4 years ago
That'd probably be best (for the bug/hg record).
Comment on attachment 761821 [details] [diff] [review]
proposed fix

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

Nice find. Seems like we don't have testcase testing ffi calls to natives yet! 
Please include a testcase.

::: js/src/ion/AsmJS.cpp
@@ +5231,5 @@
>  }
>  
>  static inline bool
> +TryEnablingIon(JSContext *cx, AsmJSModule::ExitDatum *exitDatum, int32_t argc, Value *argv)
> +{

Thanks for correcting the accolade.

@@ +5233,5 @@
>  static inline bool
> +TryEnablingIon(JSContext *cx, AsmJSModule::ExitDatum *exitDatum, int32_t argc, Value *argv)
> +{
> +    JSScript *script = exitDatum->fun->maybeNonLazyScript();
> +    if (script == NULL)

if (!script)
Attachment #761821 - Flags: review?(hv1989) → review+
(Assignee)

Comment 5

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/05bf9122d234
Duplicate of this bug: 882843
Blocks: 349611, 676763

Comment 7

4 years ago
https://hg.mozilla.org/mozilla-central/rev/05bf9122d234
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24

Updated

4 years ago
Duplicate of this bug: 883211
Depends on: 883626
You need to log in before you can comment on or make changes to this bug.