3.14.5 memory leak

39 views
Skip to first unread message

Ryan Bamford

unread,
May 25, 2018, 5:36:27 AM5/25/18
to v8-users
Im probably missing something obvious but im getting a memory leak running a very simple test app

#include <iostream>
#include <v8.h>

using namespace v8;
using namespace std;

int main(int argc, char* argv[]) {

  V8::Initialize();
  {
    HandleScope handle_scope;
    Persistent<Context> context = Context::New();
    context->Enter();
    context->Exit();
    context.Dispose();
  }
  V8::Dispose();
  return 0;
}

Have added the valgrind results as image and below is the lsan 

Direct leak of 32 byte(s) in 1 object(s) allocated from:                                                 
    #0 0x7fd80976d158 in operator new(unsigned long) (/lib64/libasan.so.4+0xe0158)                       
    #1 0x7fd8042c0934 in v8::internal::Isolate::Enter() (/lib64/libv8.so.3+0x2d1934) 

Any help would be appreciated 

NOTE: I have to use the version as am deploying to centos 6 

leak.jpg

Ryan Bamford

unread,
May 25, 2018, 5:38:27 AM5/25/18
to v8-users
Additional info the app is linked against just v8 and pthread 

Ben Noordhuis

unread,
May 25, 2018, 9:13:44 AM5/25/18
to v8-users
You're unlikely to get an answer, 3.14.5 is almost six years old.

You can build newer versions of V8 on centos 6 but you'll need devtoolset.
Reply all
Reply to author
Forward
0 new messages