Closed Bug 1118950 Opened 7 years ago Closed 7 years ago

Fix mistyped DEBUG condition in GlobalHelperThreadState()

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

Valgrind is complaining when starting a debug JS shell:

> [fjord:~/moz/mi9/js/src] valgrind --smc-check=all-non-file d64/dist/bin/js
> ==8564== Memcheck, a memory error detector
> ==8564== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
> ==8564== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
> ==8564== Command: d64/dist/bin/js
> ==8564== 
> ==8564== Conditional jump or move depends on uninitialised value(s)
> ==8564==    at 0xA58339: js::GlobalHelperThreadState::lock() (HelperThreads.cpp:513)
> ==8564==    by 0xA558A1: AutoLockHelperThreadState (HelperThreads.h:412)
> ==8564==    by 0xA558A1: js::GlobalHelperThreadState::ensureInitialized() (HelperThreads.cpp:444)
> ==8564==    by 0xAE176D: JSRuntime::init(unsigned int, unsigned int) (Runtime.cpp:283)
> ==8564==    by 0x8CEFB6: JS_NewRuntime(unsigned int, unsigned int, JSRuntime*) (jsapi.cpp:636)
> ==8564==    by 0x411E77: main (js.cpp:5839)
> ==8564== 
> ==8564== Conditional jump or move depends on uninitialised value(s)
> ==8564==    at 0xAE3730: JSRuntime::assertCanLock(js::RuntimeLock) (Runtime.cpp:849)
> ==8564==    by 0xA58344: js::GlobalHelperThreadState::lock() (HelperThreads.cpp:514)
> ==8564==    by 0xA558A1: AutoLockHelperThreadState (HelperThreads.h:412)
> ==8564==    by 0xA558A1: js::GlobalHelperThreadState::ensureInitialized() (HelperThreads.cpp:444)
> ==8564==    by 0xAE176D: JSRuntime::init(unsigned int, unsigned int) (Runtime.cpp:283)
> ==8564==    by 0x8CEFB6: JS_NewRuntime(unsigned int, unsigned int, JSRuntime*) (jsapi.cpp:636)
> ==8564==    by 0x411E77: main (js.cpp:5839)

It's caused by a typo in a #ifdef in GlobalHelperThreadState().
Who doesn't love patches that change a single char?
Attachment #8545460 - Flags: review?(bhackett1024)
Attachment #8545460 - Flags: review?(bhackett1024) → review+
https://hg.mozilla.org/mozilla-central/rev/5e04df19d581
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Duplicate of this bug: 1120458
You need to log in before you can comment on or make changes to this bug.