Last Comment Bug 765477 - IonMonkey: Assertion failure: v.isBoolean(), at jsobj.cpp:5876
: IonMonkey: Assertion failure: v.isBoolean(), at jsobj.cpp:5876
Status: RESOLVED FIXED
[jsbugmon:update,ignore]
: assertion, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86_64 Linux
: -- major (vote)
: ---
Assigned To: Nicolas B. Pierron [:nbp]
:
Mentors:
Depends on:
Blocks: langfuzz IonFuzz
  Show dependency treegraph
 
Reported: 2012-06-16 05:05 PDT by Christian Holler (:decoder)
Modified: 2013-01-14 07:48 PST (History)
7 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Do not compiled type info mixed with argument object (7.35 KB, patch)
2012-06-19 03:43 PDT, Nicolas B. Pierron [:nbp]
jdemooij: review+
Details | Diff | Splinter Review

Description Christian Holler (:decoder) 2012-06-16 05:05:20 PDT
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);
Comment 1 Nicolas B. Pierron [:nbp] 2012-06-19 03:43:51 PDT
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.
Comment 2 Jan de Mooij [:jandem] (PTO until July 31) 2012-06-20 07:14:59 PDT
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 };
Comment 3 Christian Holler (:decoder) 2012-06-28 14:23:53 PDT
JSBugMon: The testcase found in this bug no longer reproduces (tried revision 3112408514c8).
Comment 4 Nicolas B. Pierron [:nbp] 2012-07-05 10:47:22 PDT
https://hg.mozilla.org/projects/ionmonkey/rev/29aa7b886d50
Comment 5 Christian Holler (:decoder) 2013-01-14 07:48:33 PST
A testcase for this bug was automatically identified at js/src/jit-test/tests/ion/bug765477.js.

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