$ valgrind ./node_g /tmp/test.js ==19761== Memcheck, a memory error detector ==19761== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==19761== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info ==19761== Command: ./node_g /tmp/test.js ==19761== ==19761== Warning: set address range perms: large range [0x289509ff7000, 0x289529ff7000) (noaccess) ==19761== Invalid read of size 8 ==19761== at 0x4C326C8: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19761== by 0x1199360: EVP_CipherInit_ex (evp_enc.c:240) ==19761== by 0x1E2A062: node::crypto::CipherBase::InitIv(char const*, char const*, int, char const*, int) (node_crypto.cc:3292) ==19761== by 0x1E2A315: node::crypto::CipherBase::InitIv(v8::FunctionCallbackInfo const&) (node_crypto.cc:3315) ==19761== by 0x12DE51C: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo const&)) (api-arguments.cc:16) ==19761== by 0x1386638: v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) (builtins.cc:4322) ==19761== by 0x13757B0: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) (builtins.cc:4340) ==19761== by 0x137570A: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) (builtins.cc:4352) ==19761== by 0x28950A3092A6: ??? ==19761== by 0x28950A4505AD: ??? ==19761== by 0x28950A3344DA: ??? ==19761== by 0x28950A450425: ??? ==19761== Address 0x60e5dc0 is 0 bytes after a block of size 0 alloc'd ==19761== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==19761== by 0x1DBDA09: node::ArrayBufferAllocator::AllocateUninitialized(unsigned long) (node_internals.h:183) ==19761== by 0x19E4D88: v8::internal::JSTypedArray::MaterializeArrayBuffer(v8::internal::Handle) (objects.cc:19743) ==19761== by 0x19E508F: v8::internal::JSTypedArray::GetBuffer() (objects.cc:19776) ==19761== by 0x12BE830: v8::ArrayBufferView::Buffer() (api.cc:6773) ==19761== by 0x1DBFD05: node::Buffer::Data(v8::Local) (node_buffer.cc:232) ==19761== by 0x1E2A2C4: node::crypto::CipherBase::InitIv(v8::FunctionCallbackInfo const&) (node_crypto.cc:3314) ==19761== by 0x12DE51C: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo const&)) (api-arguments.cc:16) ==19761== by 0x1386638: v8::internal::MaybeHandle v8::internal::(anonymous namespace)::HandleApiCallHelper(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>) (builtins.cc:4322) ==19761== by 0x13757B0: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>, v8::internal::Isolate*) (builtins.cc:4340) ==19761== by 0x137570A: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) (builtins.cc:4352) ==19761== by 0x28950A3092A6: ??? ==19761== [iteration:0] key=0131517010204061 + data=1daae21c126127e4 => 959f39b6951d75e6 [iteration:1] key=0131517010204061 + data=1daae21c126127e4 => 8facc7e76f161de5 [iteration:2] key=0131517010204061 + data=1daae21c126127e4 => 959f39b6951d75e6 [iteration:3] key=0131517010204061 + data=1daae21c126127e4 => 959f39b6951d75e6 [iteration:4] key=0131517010204061 + data=1daae21c126127e4 => 8facc7e76f161de5 [iteration:5] key=0131517010204061 + data=1daae21c126127e4 => 959f39b6951d75e6 [iteration:6] key=0131517010204061 + data=1daae21c126127e4 => 959f39b6951d75e6 [iteration:7] key=0131517010204061 + data=1daae21c126127e4 => 8facc7e76f161de5 [iteration:8] key=0131517010204061 + data=1daae21c126127e4 => 8facc7e76f161de5 [iteration:9] key=0131517010204061 + data=1daae21c126127e4 => 959f39b6951d75e6 ==19761== Warning: set address range perms: large range [0x289509ff7000, 0x289529ff7000) (noaccess) ==19761== ==19761== HEAP SUMMARY: ==19761== in use at exit: 257,985 bytes in 3,367 blocks ==19761== total heap usage: 143,985 allocs, 140,618 frees, 59,227,564 bytes allocated ==19761== ==19761== LEAK SUMMARY: ==19761== definitely lost: 2,528 bytes in 16 blocks ==19761== indirectly lost: 75,603 bytes in 12 blocks ==19761== possibly lost: 1,456 bytes in 4 blocks ==19761== still reachable: 178,398 bytes in 3,335 blocks ==19761== of which reachable via heuristic: ==19761== newarray : 1,648 bytes in 1 blocks ==19761== suppressed: 0 bytes in 0 blocks ==19761== Rerun with --leak-check=full to see details of leaked memory ==19761== ==19761== For counts of detected and suppressed errors, rerun with: -v ==19761== ERROR SUMMARY: 10 errors from 1 contexts (suppressed: 0 from 0)