Bug 36816

Summary: Uninitalised members in BytecodeGenerator and CallLinkInfo
Product: WebKit Reporter: Balazs Kelemen <kbalazs>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Minor CC: commit-queue, laszlo.gombos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Description Flags
proposed patch none

Description Balazs Kelemen 2010-03-30 05:23:53 PDT
Valgrind shows me 2 uninitalised value problem:

Conditional jump or move depends on uninitialised value(s)
  at 0x51BBB60: cti_vm_lazyLinkCall (JITStubs.cpp:1679)
  by 0x51B0102: JSC::TrampolineStructure::TrampolineStructure() (JITStubs.h:76)
  by 0x5173A5C: JSC::JITCode::execute(JSC::RegisterFile*, JSC::ExecState*, JSC::JSGlobalData*, JSC::JSValue*) (JITCode.h:77)

Conditional jump or move depends on uninitialized value(s)
   at 0x513E0DF: JSC::BytecodeGenerator::createArgumentsIfNecessary() (BytecodeGenerator.cpp:1391)
   by 0x5147EE7: JSC::BytecodeGenerator::emitPushNewScope(JSC::RegisterID*, JSC::Identifier const&, JSC::RegisterID*)
   by 0x5154205: JSC::TryNode::emitBytecode(JSC::BytecodeGenerator&, JSC::RegisterID*) (NodesCodegen.cpp:1890)

These are caused by incomplete member initializer lists. I think the second could be dangerous.
Fortunately we can solve it by an easy fix.
Comment 1 Balazs Kelemen 2010-03-30 05:34:39 PDT
Created attachment 52025 [details]
proposed patch
Comment 2 Darin Adler 2010-03-30 11:52:37 PDT
Comment on attachment 52025 [details]
proposed patch

Why does this need to be changed? Is there a symptom to having these uninitialized? Are they ever used uninitialized?
Comment 3 Balazs Kelemen 2010-03-30 15:40:57 PDT
The backtraces above shows exactly where are they used uninitialized.
Comment 4 Oliver Hunt 2010-04-03 18:04:00 PDT
Comment on attachment 52025 [details]
proposed patch

Comment 5 WebKit Commit Bot 2010-04-03 18:17:19 PDT
Comment on attachment 52025 [details]
proposed patch

Clearing flags on attachment: 52025

Committed r57054: <http://trac.webkit.org/changeset/57054>
Comment 6 WebKit Commit Bot 2010-04-03 18:17:24 PDT
All reviewed patches have been landed.  Closing bug.