Use malloc for Nan::NewBuffer owned data

GC results in free() rather than delete[]

Add plenty of new valgrind suppressions
This commit is contained in:
Lovell Fuller
2015-08-24 16:14:49 +01:00
parent b7e0a6f277
commit 4e67a5025a
4 changed files with 166 additions and 7 deletions

View File

@@ -1,8 +1,18 @@
#!/bin/sh
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
cd ../../
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --suppressions=test/leak/libvips.supp --suppressions=test/leak/sharp.supp --leak-check=full --show-leak-kinds=definite,indirect,possible --num-callers=20 --trace-children=yes npm test
curl -o ./test/leak/libvips.supp https://raw.githubusercontent.com/jcupitt/libvips/master/libvips.supp
G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind \
--suppressions=test/leak/libvips.supp \
--suppressions=test/leak/sharp.supp \
--gen-suppressions=yes \
--leak-check=full \
--show-leak-kinds=definite,indirect,possible \
--num-callers=20 \
--trace-children=yes \
npm test