perl: Add rules + environment variables so Perl code can be valgrinded.

(cherry picked from commit e8af0982da)
This commit is contained in:
Richard W.M. Jones
2013-06-02 13:08:08 +01:00
parent 9f5f17ea62
commit fefb19beff
2 changed files with 51 additions and 0 deletions

7
run.in
View File

@@ -96,6 +96,13 @@ else
fi
export PERL5LIB
# Enable Perl valgrinding.
# XXX Unclear if this actually makes any difference. It seems you
# have to recompile the Perl interpreter with debugging enabled.
export PERL_DEBUG=1
export PERL_VALGRIND=1
export PERL_DESTRUCT_LEVEL=2
# For Python.
export PYTHON=@PYTHON@
if [ -z "$PYTHONPATH" ]; then

View File

@@ -277,3 +277,47 @@
...
fun:file_apprentice
}
# Perl
# note: Perl leaks memory by design, this just suppresses them.
{
perl_leak_1
Memcheck:Leak
...
fun:Perl_safesysmalloc
}
{
perl_leak_2
Memcheck:Leak
...
fun:Perl_safesysrealloc
}
{
perl_leak_3
Memcheck:Leak
...
fun:Perl_safesyscalloc
}
{
perl_leak_4
Memcheck:Leak
...
fun:Perl_yyparse
}
{
perl_leak_5
Memcheck:Leak
...
fun:Perl_re_compile
}
{
perl_leak_6
Memcheck:Leak
fun:malloc
fun:Perl_refcounted_he_new_pvn
}