This queue is for tickets about the Class-XSAccessor CPAN distribution.

Report information
The Basics
Id:
127331
Status:
new
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
jraspass [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
1.19
Fixed in:
(no value)



Subject: Possible memory leak
Running the following very simple one liner with Test::Valgrind produces the following output: $ perl -MTest::Valgrind -e 'use Class::XSAccessor setters => ["foo"]' # Using valgrind 3.14.0 located at /usr/bin/valgrind # Using suppressions from /home/jraspass/.perl/Test-Valgrind/suppressions/1.19/memcheck-3.14.0-0e7705778c4d7f8a7a9b7e53b50bf99d.supp 1..15 ok 1 - InvalidFree ok 2 - MismatchedFree ok 3 - InvalidRead ok 4 - InvalidWrite ok 5 - InvalidJump ok 6 - Overlap ok 7 - InvalidMemPool ok 8 - UninitCondition ok 9 - UninitValue ok 10 - SyscallParam ok 11 - ClientCheck ok 12 - Leak_DefinitelyLost ok 13 - Leak_IndirectlyLost ok 14 - Leak_PossiblyLost not ok 15 - Leak_StillReachable # Failed test 'Leak_StillReachable' # at /home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/Test/Valgrind/Session.pm line 598. # got: 6 # expected: 0 # # 32 bytes in 1 blocks are still reachable in loss record 3 of 10 # calloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) [vg_replace_malloc.c:752] # CXSA_HashTable_new (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # get_hashkey (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # XS_Class__XSAccessor_newxs_setter (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # Perl_pp_entersub (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_runops_standard (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_sv (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_list (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # S_process_special_blocks.isra.11 (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_newATTRSUB_x (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_utilize (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_yyparse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # perl_parse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # main (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # # 32 bytes in 1 blocks are still reachable in loss record 4 of 10 # malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) [vg_replace_malloc.c:299] # get_hashkey (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # XS_Class__XSAccessor_newxs_setter (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # Perl_pp_entersub (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_runops_standard (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_sv (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_list (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # S_process_special_blocks.isra.11 (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_newATTRSUB_x (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_utilize (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_yyparse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # perl_parse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # main (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # # 4 bytes in 1 blocks are still reachable in loss record 2 of 10 # malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) [vg_replace_malloc.c:299] # XS_Class__XSAccessor_newxs_setter (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # Perl_pp_entersub (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_runops_standard (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_sv (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_list (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # S_process_special_blocks.isra.11 (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_newATTRSUB_x (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_utilize (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_yyparse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # perl_parse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # main (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # # 32 bytes in 1 blocks are still reachable in loss record 5 of 10 # malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) [vg_replace_malloc.c:299] # CXSA_HashTable_store (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # get_hashkey (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # XS_Class__XSAccessor_newxs_setter (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # Perl_pp_entersub (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_runops_standard (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_sv (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_list (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # S_process_special_blocks.isra.11 (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_newATTRSUB_x (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_utilize (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_yyparse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # perl_parse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # main (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # # 128 bytes in 1 blocks are still reachable in loss record 6 of 10 # calloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) [vg_replace_malloc.c:752] # CXSA_HashTable_new (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # get_hashkey (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # XS_Class__XSAccessor_newxs_setter (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # Perl_pp_entersub (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_runops_standard (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_sv (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_list (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # S_process_special_blocks.isra.11 (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_newATTRSUB_x (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_utilize (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_yyparse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # perl_parse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # main (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # # 4 bytes in 1 blocks are still reachable in loss record 1 of 10 # malloc (/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) [vg_replace_malloc.c:299] # CXSA_HashTable_store (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # get_hashkey (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # XS_Class__XSAccessor_newxs_setter (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux/auto/Class/XSAccessor/XSAccessor.so) [?:?] # Perl_pp_entersub (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_runops_standard (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_sv (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_call_list (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # S_process_special_blocks.isra.11 (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_newATTRSUB_x (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_utilize (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Perl_yyparse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # perl_parse (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # main (/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin/perl) [?:?] # Looks like your test exited with 1 just after 15. I don't know if this is a false positive or not but I thought I should at least file it :-P I've tried a few perls but the output above is from this perl: $ perl -V Summary of my perl5 (revision 5 version 28 subversion 0) configuration: Platform: osname=linux osvers=4.17.4-1-arch archname=x86_64-linux uname='linux ux-015 4.17.4-1-arch #1 smp preempt tue jul 3 15:45:09 utc 2018 x86_64 gnulinux ' config_args='-de -Dprefix=/home/jraspass/perl5/perlbrew/perls/perl-5.28.0 -Dman1dir=none -Dman3dir=none -Accflags= -DNO_MATHOMS -DPERL_DISABLE_PMC -DSILENT_NO_TAINT_SUPPORT -march=native -O2 -Aldflags=-march=native -O2 -Aeval:scriptdir=/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin' hint=recommended useposix=true d_sigaction=define useithreads=undef usemultiplicity=undef use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='cc' ccflags ='-DNO_MATHOMS -DPERL_DISABLE_PMC -DSILENT_NO_TAINT_SUPPORT -march=native -O2 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' optimize='-O2' cppflags='-DNO_MATHOMS -DPERL_DISABLE_PMC -DSILENT_NO_TAINT_SUPPORT -march=native -O2 -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include' ccversion='' gccversion='8.1.1 20180531' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='cc' ldflags =' -march=native -O2 -fstack-protector-strong -L/usr/local/lib' libpth=/usr/local/lib /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.1/include-fixed /usr/lib /lib/../lib /usr/lib/../lib /lib /lib64 /usr/lib64 libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc libc=libc-2.27.so so=so useshrplib=false libperl=libperl.a gnulibc_version='2.27' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E' cccdlflags='-fPIC' lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES NO_MATHOMS NO_TAINT_SUPPORT PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DISABLE_PMC PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP PERL_OP_PARENT PERL_PRESERVE_IVUV SILENT_NO_TAINT_SUPPORT USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Locally applied patches: Devel::PatchPerl 1.48 Built under linux Compiled at Jul 25 2018 17:32:59 %ENV: PERLBREW_HOME="/home/jraspass/.perlbrew" PERLBREW_MANPATH="/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/man" PERLBREW_PATH="/home/jraspass/perl5/perlbrew/bin:/home/jraspass/perl5/perlbrew/perls/perl-5.28.0/bin" PERLBREW_PERL="perl-5.28.0" PERLBREW_ROOT="/home/jraspass/perl5/perlbrew" PERLBREW_SHELLRC_VERSION="0.84" PERLBREW_VERSION="0.84" @INC: /home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/x86_64-linux /home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0 /home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0/x86_64-linux /home/jraspass/perl5/perlbrew/perls/perl-5.28.0/lib/5.28.0


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.