Cloning of string-literal-valued global variables in self-hosting code doesn't work, if the variable is ever used in JITted code

RESOLVED INACTIVE

Status

()

Core
JavaScript Engine
RESOLVED INACTIVE
3 years ago
3 days ago

People

(Reporter: Waldo, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
Put something like

  var foo = "hello";

in self-hosted code.  Then use foo inside a self-hosted method that gets JITted.  At that point an assertion will be hit in IonBuilder::constant as it attempts to inline a constant string -- because self-hosting cloning code clones strings *not* as atoms.

It's not clear to me whether cloning should try to clone as atom or not.  Really it depends on the string.  For now, in my particular case of need in Intl.js (search for "en-GB"), I've instead used a function that returns a constant string.  Good enough for now for my purposes.

Comment 1

3 days ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 3 days ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.