Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valgrind errors in Storable #15948

Closed
p5pRT opened this issue Apr 11, 2017 · 8 comments
Closed

valgrind errors in Storable #15948

p5pRT opened this issue Apr 11, 2017 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 11, 2017

Migrated from rt.perl.org#131136 (status was 'resolved')

Searchable as RT131136$

@p5pRT
Copy link
Author

p5pRT commented Apr 11, 2017

From @khwilliamson

This is a bug report for perl from khw@​khw.(none),
generated with the help of perlbug 1.40 running under perl 5.26.0.


3 .t files in Storable have valgrind errors in 5.25.11.
store.t​: First attachment
retrieve.t​: 2nd
lock.t​: 3rd



Flags​:
  category=library
  severity=low
  module=Storable


Site configuration information for perl 5.26.0​:

Configured by khw at Mon Apr 10 08​:46​:47 MDT 2017.

Summary of my perl5 (revision 5 version 26 subversion 0) configuration​:
  Commit id​: b57dd50
  Platform​:
  osname=linux
  osvers=4.4.0-72-generic
  archname=x86_64-linux-thread-multi-ld
  uname='linux khw 4.4.0-72-generic #93-ubuntu smp fri mar 31
14​:07​:41 utc 2017 x86_64 x86_64 x86_64 gnulinux '
  config_args='-des -Uversiononly -Dprefix=/home/khw/blead -Dusedevel
-D'optimize=-ggdb3' -A'optimize=-ggdb3' -A'optimize=-O0'
-Accflags='-DPERL_BOOL_AS_CHAR' -Accflags='-DPERL_EXTERNAL_GLOB'
-Dman1dir=none -Dman3dir=none -Dcc=g++ -DDEBUGGING -Dusemorebits
-Dusecbacktrace -Dusethreads'
  hint=recommended
  useposix=true
  d_sigaction=define
  useithreads=define
  usemultiplicity=define
  use64bitint=define
  use64bitall=define
  uselongdouble=define
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='g++'
  ccflags ='-D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR
-DPERL_EXTERNAL_GLOB -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include -DUSE_C_BACKTRACE -g
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
  optimize='-ggdb3 -ggdb3 -O0'
  cppflags='-D_REENTRANT -D_GNU_SOURCE -DPERL_BOOL_AS_CHAR
-DPERL_EXTERNAL_GLOB -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe
-fstack-protector-strong -I/usr/local/include'
  ccversion=''
  gccversion='5.4.0 20160609'
  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='long double'
  nvsize=16
  Off_t='off_t'
  lseeksize=8
  alignbytes=16
  prototype=define
  Linker and Libraries​:
  ld='g++'
  ldflags =' -fstack-protector-strong -L/usr/local/lib'
  libpth=/usr/include/c++/5 /usr/include/x86_64-linux-gnu/c++/5
/usr/include/c++/5/backward /usr/local/lib
/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
/usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib
/usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
  libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
  libc=libc-2.23.so
  so=so
  useshrplib=false
  libperl=libperl.a
  gnulibc_version='2.23'
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs
  dlext=so
  d_dlsymun=undef
  ccdlflags='-Wl,-E'
  cccdlflags='-fPIC'
  lddlflags='-shared -ggdb3 -ggdb3 -O0 -L/usr/local/lib
-fstack-protector-strong'


@​INC for perl 5.26.0​:
  /home/khw/perl/blead/lib
  /home/khw/perl/blead/t
  /home/khw/blead/lib/perl5/site_perl/5.26.0/x86_64-linux-thread-multi-ld
  /home/khw/blead/lib/perl5/site_perl/5.26.0
  /home/khw/blead/lib/perl5/5.26.0/x86_64-linux-thread-multi-ld
  /home/khw/blead/lib/perl5/5.26.0
  /home/khw/blead/lib/perl5/site_perl/5.25.11
  /home/khw/blead/lib/perl5/site_perl/5.25.10
  /home/khw/blead/lib/perl5/site_perl/5.25.9
  /home/khw/blead/lib/perl5/site_perl/5.25.8
  /home/khw/blead/lib/perl5/site_perl/5.25.7
  /home/khw/blead/lib/perl5/site_perl/5.25.6
  /home/khw/blead/lib/perl5/site_perl/5.25.5
  /home/khw/blead/lib/perl5/site_perl/5.25.4
  /home/khw/blead/lib/perl5/site_perl/5.25.3
  /home/khw/blead/lib/perl5/site_perl/5.25.2
  /home/khw/blead/lib/perl5/site_perl/5.25.1
  /home/khw/blead/lib/perl5/site_perl/5.24.0
  /home/khw/blead/lib/perl5/site_perl/5.23.10
  /home/khw/blead/lib/perl5/site_perl/5.23.9
  /home/khw/blead/lib/perl5/site_perl/5.23.8
  /home/khw/blead/lib/perl5/site_perl/5.23.7
  /home/khw/blead/lib/perl5/site_perl/5.23.6
  /home/khw/blead/lib/perl5/site_perl/5.23.5
  /home/khw/blead/lib/perl5/site_perl/5.23.4
  /home/khw/blead/lib/perl5/site_perl/5.23.3
  /home/khw/blead/lib/perl5/site_perl/5.23.2
  /home/khw/blead/lib/perl5/site_perl/5.23.1
  /home/khw/blead/lib/perl5/site_perl/5.23.0
  /home/khw/blead/lib/perl5/site_perl/5.22.0
  /home/khw/blead/lib/perl5/site_perl/5.21.12
  /home/khw/blead/lib/perl5/site_perl/5.21.11
  /home/khw/blead/lib/perl5/site_perl/5.21.10
  /home/khw/blead/lib/perl5/site_perl/5.21.9
  /home/khw/blead/lib/perl5/site_perl/5.21.8
  /home/khw/blead/lib/perl5/site_perl/5.21.7
  /home/khw/blead/lib/perl5/site_perl/5.21.6
  /home/khw/blead/lib/perl5/site_perl/5.21.5
  /home/khw/blead/lib/perl5/site_perl/5.21.4
  /home/khw/blead/lib/perl5/site_perl/5.21.3
  /home/khw/blead/lib/perl5/site_perl/5.21.2
  /home/khw/blead/lib/perl5/site_perl/5.21.1
  /home/khw/blead/lib/perl5/site_perl/5.20.0
  /home/khw/blead/lib/perl5/site_perl/5.19.12
  /home/khw/blead/lib/perl5/site_perl/5.19.11
  /home/khw/blead/lib/perl5/site_perl/5.19.10
  /home/khw/blead/lib/perl5/site_perl


Environment for perl 5.26.0​:
  HOME=/home/khw
  LANG=en_US.UTF-8
  LANGUAGE=en_US
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)

PATH=/usr/lib/ccache​:/home/khw/bin​:/home/khw/perl5/perlbrew/bin​:/home/khw/print/bin​:/bin​:/usr/local/sbin​:/usr/local/bin​:/usr/sbin​:/usr/bin​:/sbin​:/usr/games​:/usr/local/games​:/home/khw/iands/www​:/home/khw/cxoffice/bin
  PERL5OPT=-w
  PERL_BADLANG (unset)
  PERL_DIFF_TOOL=wgdiff
  PERL_POD_PEDANTIC=1
  SHELL=/bin/ksh

@p5pRT
Copy link
Author

p5pRT commented Apr 11, 2017

From @khwilliamson

==28111== Syscall param write(buf) points to uninitialised byte(s)
==28111== at 0x4E4A4A0​: __write_nocancel (syscall-template.S​:84)
==28111== by 0x77E5F6​: PerlIOUnix_write (perlio.c​:2790)
==28111== by 0x77BDE3​: Perl_PerlIO_write (perlio.c​:1594)
==28111== by 0x780281​: PerlIOBuf_flush (perlio.c​:3970)
==28111== by 0x77BF76​: Perl_PerlIO_flush (perlio.c​:1617)
==28111== by 0x77CEFB​: PerlIOBase_close (perlio.c​:2135)
==28111== by 0x780F93​: PerlIOBuf_close (perlio.c​:4269)
==28111== by 0x77B206​: PerlIO__close (perlio.c​:1369)
==28111== by 0x77B252​: Perl_PerlIO_close (perlio.c​:1382)
==28111== by 0x716A03​: Perl_io_close (doio.c​:1129)
==28111== by 0x716704​: Perl_do_close (doio.c​:1083)
==28111== by 0x6DE24E​: Perl_pp_close (pp_sys.c​:683)
==28111== Address 0xb46fd7f is 79 bytes inside a block of size 8,224 alloc'd
==28111== at 0x4C2DB8F​: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28111== by 0x5881D0​: Perl_safesyscalloc (util.c​:435)
==28111== by 0x781171​: PerlIOBuf_get_base (perlio.c​:4308)
==28111== by 0x77C5C2​: Perl_PerlIO_get_base (perlio.c​:1768)
==28111== by 0x780AF7​: PerlIOBuf_write (perlio.c​:4170)
==28111== by 0x77BDE3​: Perl_PerlIO_write (perlio.c​:1594)
==28111== by 0xA5E1F2E​: magic_write(interpreter*, stcxt*) (Storable.xs​:3818)
==28111== by 0xA5E25A0​: do_store(interpreter*, _PerlIO**, sv*, int, int, sv**) (Storable.xs​:3905)
==28111== by 0xA5F45ED​: XS_Storable_pstore(interpreter*, cv*) (Storable.xs​:6687)
==28111== by 0x5F8501​: Perl_pp_entersub (pp_hot.c​:4231)
==28111== by 0x585DC9​: Perl_runops_debug (dump.c​:2451)
==28111== by 0x4681E3​: S_run_body (perl.c​:2524)
==28111==

@p5pRT
Copy link
Author

p5pRT commented Apr 11, 2017

From @khwilliamson

==27922== Syscall param write(buf) points to uninitialised byte(s)
==27922== at 0x4E4A4A0​: __write_nocancel (syscall-template.S​:84)
==27922== by 0x77E5F6​: PerlIOUnix_write (perlio.c​:2790)
==27922== by 0x77BDE3​: Perl_PerlIO_write (perlio.c​:1594)
==27922== by 0x780281​: PerlIOBuf_flush (perlio.c​:3970)
==27922== by 0x77BF76​: Perl_PerlIO_flush (perlio.c​:1617)
==27922== by 0x77CEFB​: PerlIOBase_close (perlio.c​:2135)
==27922== by 0x780F93​: PerlIOBuf_close (perlio.c​:4269)
==27922== by 0x77B206​: PerlIO__close (perlio.c​:1369)
==27922== by 0x77B252​: Perl_PerlIO_close (perlio.c​:1382)
==27922== by 0x716A03​: Perl_io_close (doio.c​:1129)
==27922== by 0x716704​: Perl_do_close (doio.c​:1083)
==27922== by 0x6DE24E​: Perl_pp_close (pp_sys.c​:683)
==27922== Address 0xb45f561 is 81 bytes inside a block of size 8,224 alloc'd
==27922== at 0x4C2DB8F​: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27922== by 0x5881D0​: Perl_safesyscalloc (util.c​:435)
==27922== by 0x781171​: PerlIOBuf_get_base (perlio.c​:4308)
==27922== by 0x77C5C2​: Perl_PerlIO_get_base (perlio.c​:1768)
==27922== by 0x780AF7​: PerlIOBuf_write (perlio.c​:4170)
==27922== by 0x77BDE3​: Perl_PerlIO_write (perlio.c​:1594)
==27922== by 0xA5E1F2E​: magic_write(interpreter*, stcxt*) (Storable.xs​:3818)
==27922== by 0xA5E25A0​: do_store(interpreter*, _PerlIO**, sv*, int, int, sv**) (Storable.xs​:3905)
==27922== by 0xA5F45ED​: XS_Storable_pstore(interpreter*, cv*) (Storable.xs​:6687)
==27922== by 0x5F8501​: Perl_pp_entersub (pp_hot.c​:4231)
==27922== by 0x585DC9​: Perl_runops_debug (dump.c​:2451)
==27922== by 0x4681E3​: S_run_body (perl.c​:2524)
==27922==

@p5pRT
Copy link
Author

p5pRT commented Apr 11, 2017

From @khwilliamson

==27781== Syscall param write(buf) points to uninitialised byte(s)
==27781== at 0x4E4A4A0​: __write_nocancel (syscall-template.S​:84)
==27781== by 0x77E5F6​: PerlIOUnix_write (perlio.c​:2790)
==27781== by 0x77BDE3​: Perl_PerlIO_write (perlio.c​:1594)
==27781== by 0x780281​: PerlIOBuf_flush (perlio.c​:3970)
==27781== by 0x77BF76​: Perl_PerlIO_flush (perlio.c​:1617)
==27781== by 0x77CEFB​: PerlIOBase_close (perlio.c​:2135)
==27781== by 0x780F93​: PerlIOBuf_close (perlio.c​:4269)
==27781== by 0x77B206​: PerlIO__close (perlio.c​:1369)
==27781== by 0x77B252​: Perl_PerlIO_close (perlio.c​:1382)
==27781== by 0x716A03​: Perl_io_close (doio.c​:1129)
==27781== by 0x716704​: Perl_do_close (doio.c​:1083)
==27781== by 0x6DE24E​: Perl_pp_close (pp_sys.c​:683)
==27781== Address 0xb22165f is 79 bytes inside a block of size 8,224 alloc'd
==27781== at 0x4C2DB8F​: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27781== by 0x5881D0​: Perl_safesyscalloc (util.c​:435)
==27781== by 0x781171​: PerlIOBuf_get_base (perlio.c​:4308)
==27781== by 0x77C5C2​: Perl_PerlIO_get_base (perlio.c​:1768)
==27781== by 0x780AF7​: PerlIOBuf_write (perlio.c​:4170)
==27781== by 0x77BDE3​: Perl_PerlIO_write (perlio.c​:1594)
==27781== by 0xB606F2E​: magic_write(interpreter*, stcxt*) (Storable.xs​:3818)
==27781== by 0xB6075A0​: do_store(interpreter*, _PerlIO**, sv*, int, int, sv**) (Storable.xs​:3905)
==27781== by 0xB6195ED​: XS_Storable_pstore(interpreter*, cv*) (Storable.xs​:6687)
==27781== by 0x5F8501​: Perl_pp_entersub (pp_hot.c​:4231)
==27781== by 0x585DC9​: Perl_runops_debug (dump.c​:2451)
==27781== by 0x4681E3​: S_run_body (perl.c​:2524)
==27781==

@p5pRT
Copy link
Author

p5pRT commented Dec 7, 2017

From @tonycoz

On Tue, 11 Apr 2017 09​:57​:51 -0700, public@​khwilliamson.com wrote​:


3 .t files in Storable have valgrind errors in 5.25.11.
store.t​: First attachment
retrieve.t​: 2nd
lock.t​: 3rd

This iss caused by padding when writing long doubles.

Fixed in my working Storable branch.

Tony

@p5pRT
Copy link
Author

p5pRT commented Dec 7, 2017

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Aug 6, 2019

From @tonycoz

On Wed, 06 Dec 2017 16​:51​:19 -0800, tonyc wrote​:

On Tue, 11 Apr 2017 09​:57​:51 -0700, public@​khwilliamson.com wrote​:
---------------

3 .t files in Storable have valgrind errors in 5.25.11.
store.t​: First attachment
retrieve.t​: 2nd
lock.t​: 3rd

This iss caused by padding when writing long doubles.

Fixed in my working Storable branch.

The fix was merged into blead as 4896813 and included in perl 5.28.0.

Thanks for the report.

Closing.

Tony

@p5pRT
Copy link
Author

p5pRT commented Aug 6, 2019

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant