Skip to content

Commit

Permalink
Showing 3 changed files with 119 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -13,3 +13,4 @@ results
build
node_modules
tests/fixtures/output.*
tests/libvips.supp
7 changes: 7 additions & 0 deletions tests/leak.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if ! type valgrind >/dev/null; then
echo "Please install valgrind before running memory leak tests"
exit 1
fi

curl -O https://raw.githubusercontent.com/jcupitt/libvips/master/libvips.supp
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --suppressions=libvips.supp --suppressions=sharp.supp --leak-check=full --show-leak-kinds=definite,indirect,possible node unit.js
111 changes: 111 additions & 0 deletions tests/sharp.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# libjpeg warnings
{
cond_jpeg_read_scanlines
Memcheck:Cond
...
fun:jpeg_read_scanlines
}
{
value_jpeg_read_scanlines
Memcheck:Value8
...
fun:jpeg_read_scanlines
}
{
cond_jpeg_write_scanlines
Memcheck:Cond
...
fun:jpeg_write_scanlines
}
{
cond_jpeg_finish_compress
Memcheck:Cond
...
fun:jpeg_finish_compress
}
{
value_jpeg_finish_compress
Memcheck:Value8
...
fun:jpeg_finish_compress
}

# libvips interpolator warnings
{
cond_libvips_interpolate_lbb
Memcheck:Cond
...
fun:_ZL32vips_interpolate_lbb_interpolateP16_VipsInterpolatePvP11_VipsRegiondd
fun:vips_affine_gen
}

# libuv warnings
{
free_libuv
Memcheck:Free
...
fun:uv__work_done
}

# nodejs warnings
{
param_nodejs_write_buffer
Memcheck:Param
write(buf)
...
obj:/usr/bin/nodejs
}
{
leak_nodejs_ImmutableAsciiSource_CreateFromLiteral
Memcheck:Leak
match-leak-kinds: definite
...
fun:_ZN4node20ImmutableAsciiSource17CreateFromLiteralEPKcm
}
{
leak_nodejs_Buffer_New
Memcheck:Leak
match-leak-kinds: definite
...
fun:_ZN4node6Buffer3NewERKN2v89ArgumentsE
}
{
leak_nodejs_Buffer_Replace
Memcheck:Leak
match-leak-kinds: indirect,possible
...
fun:_ZN4node6Buffer7ReplaceEPcmPFvS1_PvES2_
}
{
leak_nodejs_SignalWrap_New
Memcheck:Leak
match-leak-kinds: possible
...
fun:_ZN4node10SignalWrap3NewERKN2v89ArgumentsE
}
{
leak_nodejs_TTYWrap_New
Memcheck:Leak
match-leak-kinds: possible
...
fun:_ZN4node7TTYWrap3NewERKN2v89ArgumentsE
}
{
leak_nodejs_ares_init_options
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:strdup
...
fun:ares_init_options
}

# vips__init warnings
{
leak_libvips_init
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
...
fun:vips__init
}

0 comments on commit 87f6e83

Please sign in to comment.