Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 764163 - IonMonkey/JM: getNewObject() should check needZealousGC() at runtime.
: IonMonkey/JM: getNewObject() should check needZealousGC() at runtime.
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Eric Faust [:efaust]
: Jason Orendorff [:jorendorff]
Depends on:
Blocks: IonMonkey
  Show dependency treegraph
Reported: 2012-06-12 14:10 PDT by Sean Stangl [:sstangl]
Modified: 2012-06-13 23:28 PDT (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description Sean Stangl [:sstangl] 2012-06-12 14:10:02 PDT
getNewObject() in both JITs contains the following compile-time check:

>#ifdef JS_GC_ZEAL
>    if (cx->runtime->needZealousGC()) {
>        jump(fail);
>        return;
>    }

As exists, the code assumes that when the next GC occurs, the executable code would be GC'd, then later regenerated. Since IM/JM code is now preserved on GC, needZealousGC() should actually be checked every time we attempt to perform an inline allocation.

Affects both IM and JM, but only in debug mode.
Comment 1 Eric Faust [:efaust] 2012-06-13 20:43:48 PDT
We simply check cx->runtime->gcZeal_ instead of calling needZealousGC() to prevent call and rearrangement overhead.

JM was not patched.
Comment 2 Robert Longson 2012-06-13 23:28:11 PDT
Check is misspelled as Cehck in the comment in

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