Skip to content

Instantly share code, notes, and snippets.

@nkallen
Created September 3, 2013 22:38
Show Gist options
  • Save nkallen/6430565 to your computer and use it in GitHub Desktop.
Save nkallen/6430565 to your computer and use it in GitHub Desktop.
Valgrind output from nodegit/wip's example/walk-history.js
var git = require('../'),
path = require('path');
git.Repo.open(path.resolve(__dirname, '../.git'), function(error, repo) {
if (error) throw error;
repo.getMaster(function(error, branch) {
if (error) throw error;
for (var i = 0; i < 20; i++) {
var history = branch.history();
history.on('commit', function(commit) {
console.log('commit ' + commit.sha());
console.log('Author:', commit.author().name() + ' <' + commit.author().email() + '>');
console.log('Date:', commit.date());
console.log('\n ' + commit.message());
});
history.start();
}
});
});
process.on('exit', function() {
global.gc();
git.Threads.shutdown();
});
==26064== Memcheck, a memory error detector
==26064== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==26064== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==26064== Command: node --expose-gc example/walk-history.js
==26064==
==26064== Warning: noted but unhandled ioctl 0x5451 with no size/direction hints
==26064== This could cause spurious value errors to appear.
==26064== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==26064== Warning: noted but unhandled ioctl 0x5451 with no size/direction hints
==26064== This could cause spurious value errors to appear.
==26064== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==26064== Warning: noted but unhandled ioctl 0x5451 with no size/direction hints
==26064== This could cause spurious value errors to appear.
==26064== See README_MISSING_SYSCALL_OR_IOCTL for guidance on writing a proper wrapper.
==26064== Warning: set address range perms: large range [0x1f562454000, 0x1f582454000) (noaccess)
==26064== Warning: set address range perms: large range [0x1f562454000, 0x1f582454000) (noaccess)
==26064==
==26064== HEAP SUMMARY:
==26064== in use at exit: 92,150 bytes in 86 blocks
==26064== total heap usage: 345,036 allocs, 344,950 frees, 125,532,250 bytes allocated
==26064==
==26064== 24 bytes in 1 blocks are definitely lost in loss record 10 of 34
==26064== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x5A2BFD: node::ImmutableAsciiSource::CreateFromLiteral(char const*, unsigned long) (in /usr/bin/nodejs)
==26064== by 0x58E69B: node::Load(v8::Handle<v8::Object>) (in /usr/bin/nodejs)
==26064== by 0x58FC29: node::Start(int, char**) (in /usr/bin/nodejs)
==26064== by 0x5C8E76C: (below main) (libc-start.c:226)
==26064==
==26064== 24 bytes in 1 blocks are definitely lost in loss record 11 of 34
==26064== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x5A2BFD: node::ImmutableAsciiSource::CreateFromLiteral(char const*, unsigned long) (in /usr/bin/nodejs)
==26064== by 0x59FC52: node::MainSource() (in /usr/bin/nodejs)
==26064== by 0x58E6A3: node::Load(v8::Handle<v8::Object>) (in /usr/bin/nodejs)
==26064== by 0x58FC29: node::Start(int, char**) (in /usr/bin/nodejs)
==26064== by 0x5C8E76C: (below main) (libc-start.c:226)
==26064==
==26064== 24 bytes in 1 blocks are definitely lost in loss record 12 of 34
==26064== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x72E8CD7: git__malloc (util.h:27)
==26064== by 0x72E8DEB: git__global_state (global.c:156)
==26064== by 0x72BA96F: set_error (errors.c:24)
==26064== by 0x72BAB3F: giterr_set (errors.c:74)
==26064== by 0x72891BE: git_futils_find_in_dirlist (fileops.c:721)
==26064== by 0x728921F: git_futils_find_global_file (fileops.c:733)
==26064== by 0x72C68A3: git_config_find_global_r (config.c:542)
==26064== by 0x72E42DE: git_repository_config__weakptr (repository.c:524)
==26064== by 0x72E3419: load_config_data (repository.c:137)
==26064== by 0x72E3E81: git_repository_open_ext (repository.c:394)
==26064== by 0x72E3EFF: git_repository_open (repository.c:408)
==26064==
==26064== 24 bytes in 1 blocks are definitely lost in loss record 13 of 34
==26064== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x72E8CD7: git__malloc (util.h:27)
==26064== by 0x72E8DEB: git__global_state (global.c:156)
==26064== by 0x72BA96F: set_error (errors.c:24)
==26064== by 0x72BAB3F: giterr_set (errors.c:74)
==26064== by 0x72E16F1: git_odb__error_notfound (odb.c:889)
==26064== by 0x728B841: loose_backend__read (odb_loose.c:613)
==26064== by 0x72E0D6F: git_odb_read (odb.c:646)
==26064== by 0x72E8055: git_object_lookup_prefix (object.c:177)
==26064== by 0x72E8171: git_object_lookup (object.c:211)
==26064== by 0x704877F: GitRepo::GetCommitWork(uv_work_s*) (in /home/parallels/Workspace/nodegit/build/Release/nodegit.node)
==26064== by 0x6D786C: ??? (in /usr/bin/nodejs)
==26064==
==26064== 48 bytes in 2 blocks are definitely lost in loss record 18 of 34
==26064== at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x72E8CD7: git__malloc (util.h:27)
==26064== by 0x72E8DEB: git__global_state (global.c:156)
==26064== by 0x72BA96F: set_error (errors.c:24)
==26064== by 0x72BAB3F: giterr_set (errors.c:74)
==26064== by 0x72E16F1: git_odb__error_notfound (odb.c:889)
==26064== by 0x728B841: loose_backend__read (odb_loose.c:613)
==26064== by 0x72E0D6F: git_odb_read (odb.c:646)
==26064== by 0x72DE97B: git_commit_list_parse (commit_list.c:182)
==26064== by 0x72D1C91: git_merge__bases_many (merge.c:216)
==26064== by 0x72D0D58: prepare_walk (revwalk.c:341)
==26064== by 0x72D12B1: git_revwalk_next (revwalk.c:468)
==26064==
==26064== 56 bytes in 1 blocks are definitely lost in loss record 19 of 34
==26064== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x5907B5: node::Buffer::New(v8::Arguments const&) (in /usr/bin/nodejs)
==26064== by 0x7087EA: ??? (in /usr/bin/nodejs)
==26064== by 0x1F562506361: ???
==26064== by 0x1F56250D3F2: ???
==26064== by 0x1F562537014: ???
==26064== by 0x1F56250CCCD: ???
==26064== by 0x1F56252F1F7: ???
==26064== by 0x1F56252E9E7: ???
==26064== by 0x1F562534335: ???
==26064== by 0x1F56252DEC4: ???
==26064== by 0x1F56252D9A4: ???
==26064==
==26064== 344 bytes in 1 blocks are possibly lost in loss record 27 of 34
==26064== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x5AC6BC: node::TTYWrap::New(v8::Arguments const&) (in /usr/bin/nodejs)
==26064== by 0x7087EA: ??? (in /usr/bin/nodejs)
==26064== by 0x1F562506361: ???
==26064== by 0x1F56250D3F2: ???
==26064== by 0x1F5625811FF: ???
==26064== by 0x1F56250D1E9: ???
==26064== by 0x1F56257C7F6: ???
==26064== by 0x1F56257D131: ???
==26064== by 0x1F56250D506: ???
==26064== by 0x1F562506115: ???
==26064== by 0x72F782: ??? (in /usr/bin/nodejs)
==26064==
==26064== 960 bytes in 40 blocks are definitely lost in loss record 28 of 34
==26064== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x5A2BFD: node::ImmutableAsciiSource::CreateFromLiteral(char const*, unsigned long) (in /usr/bin/nodejs)
==26064== by 0x59FCA4: node::DefineJavaScript(v8::Handle<v8::Object>) (in /usr/bin/nodejs)
==26064== by 0x58BA26: ??? (in /usr/bin/nodejs)
==26064== by 0x70B8CA: ??? (in /usr/bin/nodejs)
==26064== by 0x1F562506361: ???
==26064== by 0x1F56252D712: ???
==26064== by 0x1F56250D506: ???
==26064== by 0x1F562506115: ???
==26064== by 0x72F782: ??? (in /usr/bin/nodejs)
==26064== by 0x73104A: v8::internal::Execution::Call(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, bool*, bool) (in /usr/bin/nodejs)
==26064== by 0x6ED294: v8::Function::Call(v8::Handle<v8::Object>, int, v8::Handle<v8::Value>*) (in /usr/bin/nodejs)
==26064==
==26064== 8,248 (56 direct, 8,192 indirect) bytes in 1 blocks are definitely lost in loss record 33 of 34
==26064== at 0x4C2B1C7: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==26064== by 0x5907B5: node::Buffer::New(v8::Arguments const&) (in /usr/bin/nodejs)
==26064== by 0x7087EA: ??? (in /usr/bin/nodejs)
==26064== by 0x1F562506361: ???
==26064== by 0x1F56250D3F2: ???
==26064== by 0x1F5625AC562: ???
==26064== by 0x1F56250CCCD: ???
==26064== by 0x1F56250D1E3: ???
==26064== by 0x1F5625926B4: ???
==26064== by 0x1F56250CCCD: ???
==26064== by 0x1F562591E5F: ???
==26064== by 0x1F56250CCCD: ???
==26064==
==26064== LEAK SUMMARY:
==26064== definitely lost: 1,216 bytes in 48 blocks
==26064== indirectly lost: 8,192 bytes in 1 blocks
==26064== possibly lost: 344 bytes in 1 blocks
==26064== still reachable: 82,398 bytes in 36 blocks
==26064== suppressed: 0 bytes in 0 blocks
==26064== Reachable blocks (those to which a pointer was found) are not shown.
==26064== To see them, rerun with: --leak-check=full --show-reachable=yes
==26064==
==26064== For counts of detected and suppressed errors, rerun with: -v
==26064== ERROR SUMMARY: 9 errors from 9 contexts (suppressed: 2 from 2)
% valgrind --tool=memcheck --leak-check=yes node --expose-gc example/walk-history.js > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment