Closed Bug 1718231 Opened 4 years ago Closed 4 years ago

JS::ContextOptions::ergonomicBrandChecks_ is sometimes used before it is defined

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: jseward, Assigned: jseward)

Details

Attachments

(3 files)

Attached file Valgrind complainage

It appears that (1) JS::ContextOptions::ContextOptions() doesn't give an
initial value for field ergonomicBrandChecks_, and (2) at least in a browser
build, it can be used in that state. A minimal bit of poking around suggests
that it might be defined in shell builds, but not in browser builds.

The result is a bunch of Valgrind complaints in the JS parser, in orExpr.

Doing the obvious thing (setting it to false in
JS::ContextOptions::ContextOptions()) stops Valgrind complaining.

This appears to be related to bug 1648090.

Attached patch Possible fixSplinter Review

The obvious fix. I'm not claiming that this is the right fix,
merely that it stops Valgrind complaining.

Assignee: nobody → jseward

The obvious fix looks right. Thanks for looking into this!

Did you want to land this patch Julian? (otherwise I can)

Flags: needinfo?(jseward)

It appears that (1) JS::ContextOptions::ContextOptions() doesn't give an
initial value for field ergonomicBrandChecks_, and (2) at least in a browser
build, it can be used in that state. This trivial patch initialises it to
false.

Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce3c35cb21fc JS::ContextOptions::ergonomicBrandChecks_ is sometimes used before it is defined. r=mgaudet.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Flags: needinfo?(jseward)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: