IonMonkey: Assertion failure: v.isBoolean(), at jsobj.cpp:5876

RESOLVED FIXED

Status

()

Core
JavaScript Engine
--
major
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: decoder, Assigned: nbp)

Tracking

(Blocks: 2 bugs, {assertion, testcase})

Other Branch
x86_64
Linux
assertion, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [jsbugmon:update,ignore])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
The following testcase asserts on ionmonkey revision de23a9fc29db (run with --ion -n -m --ion-eager):


function f(useArg2, arg2, expect) {
    var args = arguments;
    if (useArg2)
	args = arg2;
    assertEq(args.length, expect);
}
f(false, 0, 3);
f(false, 0, 3);
Assignee: general → nicolas.b.pierron
Created attachment 634332 [details] [diff] [review]
Do not compiled type info mixed with argument object

Every time we check for an argument object, we ensure that this is the uniq flag.
Attachment #634332 - Flags: review?(jdemooij)
Comment on attachment 634332 [details] [diff] [review]
Do not compiled type info mixed with argument object

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

This approach seems reasonable, r=me with nits addressed.

::: js/src/ion/IonBuilder.cpp
@@ +4054,5 @@
>          return jsop_getelem_string();
>  
> +    TypeCertainty isArguments = oracle->elementReadMagicArguments(script, pc);
> +    if (isArguments == UnSure)
> +        return abort("Type tags are messed-up.");

Nit: when reading the spew it would help to know the reason has to do with (lazy) arguments. So maybe something like "Not definitely accessing lazy arguments"?

::: js/src/ion/TypeOracle.cpp
@@ +556,5 @@
>  {
>      return getMIRType(script->analysis()->pushedTypes(pc, 0));
>  }
>  
> +TypeCertainty

Nit: a small comment here would be good, explaining why we have to do this.

@@ +562,5 @@
>  {
>      types::TypeSet *obj = script->analysis()->poppedTypes(pc, 0);
> +    if (obj->isMagicArguments(cx))
> +        return SureTrue;
> +    if (obj->hasAnyFlag(TYPE_FLAG_LAZYARGS))

Lazy args is not used if "obj" here could be "unknown" right?

::: js/src/ion/TypeOracle.h
@@ +74,5 @@
> +enum TypeCertainty {
> +    UnSure = 0,
> +    SureTrue,
> +    SureFalse
> +};

Nit: something like this seems slightly more readable: LazyArgumentsType { DefinitelyArguments, MaybeArguments, NotArguments };
Attachment #634332 - Flags: review?(jdemooij) → review+
(Reporter)

Comment 3

5 years ago
JSBugMon: The testcase found in this bug no longer reproduces (tried revision 3112408514c8).
(Reporter)

Updated

5 years ago
Whiteboard: [jsbugmon:update] → [jsbugmon:update,ignore]
https://hg.mozilla.org/projects/ionmonkey/rev/29aa7b886d50
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 5

4 years ago
A testcase for this bug was automatically identified at js/src/jit-test/tests/ion/bug765477.js.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.