The default bug view has changed. See this FAQ.

IonMonkey/JM: getNewObject() should check needZealousGC() at runtime.

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: sstangl, Assigned: efaust)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
getNewObject() in both JITs contains the following compile-time check:

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

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.
(Assignee)

Comment 1

5 years ago
We simply check cx->runtime->gcZeal_ instead of calling needZealousGC() to prevent call and rearrangement overhead.

https://hg.mozilla.org/projects/ionmonkey/rev/b4fd23971959

JM was not patched.
(Assignee)

Updated

5 years ago
Assignee: general → efaust
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 2

5 years ago
Check is misspelled as Cehck in the comment in https://hg.mozilla.org/projects/ionmonkey/rev/b4fd23971959
You need to log in before you can comment on or make changes to this bug.