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: Syscall param write(buf) points to uninitialised byte(s) #20

Open
garrison opened this issue Aug 27, 2021 · 1 comment
Open

Comments

@garrison
Copy link
Owner

When run under valgrind, the MatrixRoundTrip.LongDouble test emits a warning:

==3258== Syscall param write(buf) points to uninitialised byte(s)
==3258==    at 0x4F621E7: write (write.c:26)
==3258==    by 0x4960BAB: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x495A427: H5FD_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x493985A: H5F__accum_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4A3C30A: H5PB_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x49441AC: H5F_block_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4905602: H5D__flush_sieve_buf (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x48F7F15: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4905706: H5D__flush_real (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4905804: H5D_close (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x49061E5: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x49B4E1F: H5I_dec_ref (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==  Address 0x55ece92 is 18 bytes inside a block of size 200 alloc'd
==3258==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==3258==    by 0x4964641: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4964E58: H5FL_blk_malloc (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4965059: H5FL_blk_calloc (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x48F739D: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4AF5910: H5VM_opvv (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x48F6F67: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4911FE8: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x4912849: H5D__select_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x48F8036: H5D__contig_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x490BEB0: H5D__write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258==    by 0x490C69C: H5Dwrite (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.0.0)
==3258== 

I am not sure if this is a problem with eigen3-hdf5 or is entirely an issue with the underlying library. It might even be benign, in which case we should add a suppression. Once this is resolved, we should run valgrind with --error-exitcode=1 so CI fails if any new error is introduced.

@garrison
Copy link
Owner Author

garrison commented Aug 27, 2021

I just reproduced this in a Ubuntu 16.04 (xenial) Docker container, both on the latest commit (f161974) and in the commit this test was introduced (9804313). Here's the output:

==4176== Syscall param write(buf) points to uninitialised byte(s)
==4176==    at 0x5BCA3C0: __write_nocancel (syscall-template.S:84)
==4176==    by 0x4EE4893: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EDEEEC: H5FD_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4ECF976: H5F__accum_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4ED21D3: H5F_block_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EB1500: H5D__flush_sieve_buf (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EAA298: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EB1644: H5D__flush_real (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EB1810: H5D_close (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4F2DCA5: H5I_dec_ref (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4F2DD5D: H5I_dec_app_ref (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4F2DF7D: H5I_dec_app_ref_always_close (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==  Address 0x7374d32 is 18 bytes inside a block of size 200 alloc'd
==4176==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4176==    by 0x4EE77AD: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EE7E38: H5FL_blk_malloc (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EE7F44: H5FL_blk_calloc (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EA9874: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x5031919: H5VM_opvv (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EA929C: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EBA4AB: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EBAD1C: H5D__select_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EAA359: H5D__contig_write (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EB4C54: ??? (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176==    by 0x4EB5129: H5Dwrite (in /usr/lib/x86_64-linux-gnu/libhdf5_serial.so.10.1.0)
==4176== 

so I think this may indeed be from the underlying library, especially because it only appears in the tests for long double.

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