Hi, I'm using v8 on a Debian Lenny ( 2.6.26-2-amd64 ); while playing with some basic examples ( http://code.google.com/apis/v8/get_started.html ) and testing memory and speed related stuff I discovered a memleak in Context::New(). I've traced down the problem to execution.cc line 92 ( macro call CALL_GENERATED_CODE ). Although the call is not causing a crash in runtime I was able to reproduce it using valgrind ( dump is below )
==00:00:00:03.861 5865== at 0x9F3DC8B: ??? ==00:00:00:03.861 5865== by 0x438EA6: _ZN2v88internalL6InvokeEbNS0_6HandleINS0_10JSFunctionEEENS1_INS0_6ObjectEEEiPPPS4_Pb (execution.cc:126) ==00:00:00:03.861 5865== by 0x4393CB: v8::internal::Execution::Call (v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Object***, bool*) (execution.cc:155) ==00:00:00:03.861 5865== by 0x41DE84: v8::internal::Genesis::CompileScriptCached(v8::internal::Vector<char const>, v8::internal::Handle<v8::internal::String>, v8::internal::SourceCodeCache*, v8::Extension*, bool) (bootstrapper.cc: 945) ==00:00:00:03.861 5865== by 0x41E2A3: v8::internal::Genesis::CompileNative(v8::internal::Vector<char const>, v8::internal::Handle<v8::internal::String>) (bootstrapper.cc:897) ==00:00:00:03.861 5865== by 0x41E5B7: v8::internal::Genesis::CompileBuiltin(int) (bootstrapper.cc:887) ==00:00:00:03.861 5865== by 0x41EE10: v8::internal::Genesis::InstallNatives() (bootstrapper.cc:1145) ==00:00:00:03.861 5865== by 0x41F385: v8::internal::Genesis::Genesis (v8::internal::Handle<v8::internal::Object>, v8::Handle<v8::ObjectTemplate>, v8::ExtensionConfiguration*) (bootstrapper.cc:1586) ==00:00:00:03.862 5865== by 0x41F469: v8::internal::Bootstrapper::CreateEnvironment (v8::internal::Handle<v8::internal::Object>, v8::Handle<v8::ObjectTemplate>, v8::ExtensionConfiguration*) (bootstrapper.cc:379) ==00:00:00:03.862 5865== by 0x40B707: v8::Context::New (v8::ExtensionConfiguration*, v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Value>) (api.cc:2747) ==00:00:00:03.862 5865== by 0x402DB6: main (in /fooPath/hw1) -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
