octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58268] hdf5 load crashes on strings


From: Elvis Stansvik
Subject: [Octave-bug-tracker] [bug #58268] hdf5 load crashes on strings
Date: Wed, 29 Apr 2020 05:25:54 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Follow-up Comment #5, bug #58268 (project octave):

Valgrind reports:


$ valgrind octave-cli --eval "load outfile.hdf5"
==24612== Memcheck, a memory error detector
==24612== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==24612== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==24612== Command: octave-cli --eval load\ outfile.hdf5
==24612== 
==24612== Invalid write of size 1
==24612==    at 0x4840273: memcpy@GLIBC_2.2.5 (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==24612==    by 0x737A37F: memcpy (string_fortified.h:34)
==24612==    by 0x737A37F: H5D__scatter_mem (H5Dscatgath.c:340)
==24612==    by 0x737A37F: H5D__scatter_mem (H5Dscatgath.c:291)
==24612==    by 0x737A9C9: H5D__scatgath_read (H5Dscatgath.c:567)
==24612==    by 0x7362FA3: H5D__contig_read (H5Dcontig.c:595)
==24612==    by 0x7376513: H5D__read (H5Dio.c:600)
==24612==    by 0x7376A0C: H5Dread (H5Dio.c:198)
==24612==    by 0x553EE84: octave_char_matrix_str::load_hdf5(long, char
const*) (ov-str-mat.cc:703)
==24612==    by 0x5A52675: octave_value::load_hdf5(long, char const*)
(ov.h:1321)
==24612==    by 0x5A51008: hdf5_read_next_data_internal(long, char const*,
void*) (ls-hdf5.cc:748)
==24612==    by 0x73E7835: H5G_iterate_cb (H5Gint.c:818)
==24612==    by 0x73EF237: H5G__node_iterate (H5Gnode.c:1002)
==24612==    by 0x7320FC5: H5B__iterate_helper (H5B.c:1165)
==24612==  Address 0xfbf7ae8 is 0 bytes after a block of size 24 alloc'd
==24612==    at 0x483C583: operator new[](unsigned long) (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==24612==    by 0x546FB2C: std::_MakeUniq<char []>::__array
std::make_unique<char []>(unsigned long) (unique_ptr.h:863)
==24612==    by 0x553EE00: octave_char_matrix_str::load_hdf5(long, char
const*) (ov-str-mat.cc:698)
==24612==    by 0x5A52675: octave_value::load_hdf5(long, char const*)
(ov.h:1321)
==24612==    by 0x5A51008: hdf5_read_next_data_internal(long, char const*,
void*) (ls-hdf5.cc:748)
==24612==    by 0x73E7835: H5G_iterate_cb (H5Gint.c:818)
==24612==    by 0x73EF237: H5G__node_iterate (H5Gnode.c:1002)
==24612==    by 0x7320FC5: H5B__iterate_helper (H5B.c:1165)
==24612==    by 0x732255D: H5B_iterate (H5B.c:1210)
==24612==    by 0x73F546C: H5G__stab_iterate (H5Gstab.c:556)
==24612==    by 0x73F1E68: H5G__obj_iterate (H5Gobj.c:697)
==24612==    by 0x73E8BCE: H5G_iterate (H5Gint.c:892)
==24612== 
==24612== Invalid read of size 1
==24612==    at 0x483EFB4: __strlen_sse2 (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==24612==    by 0x66626B1: charNDArray::charNDArray(char const*)
(chNDArray.cc:55)
==24612==    by 0x553F6C8: charMatrix::charMatrix(char const*)
(chMatrix.h:70)
==24612==    by 0x553EEDE: octave_char_matrix_str::load_hdf5(long, char
const*) (ov-str-mat.cc:713)
==24612==    by 0x5A52675: octave_value::load_hdf5(long, char const*)
(ov.h:1321)
==24612==    by 0x5A51008: hdf5_read_next_data_internal(long, char const*,
void*) (ls-hdf5.cc:748)
==24612==    by 0x73E7835: H5G_iterate_cb (H5Gint.c:818)
==24612==    by 0x73EF237: H5G__node_iterate (H5Gnode.c:1002)
==24612==    by 0x7320FC5: H5B__iterate_helper (H5B.c:1165)
==24612==    by 0x732255D: H5B_iterate (H5B.c:1210)
==24612==    by 0x73F546C: H5G__stab_iterate (H5Gstab.c:556)
==24612==    by 0x73F1E68: H5G__obj_iterate (H5Gobj.c:697)
==24612==  Address 0xfbf7ae8 is 0 bytes after a block of size 24 alloc'd
==24612==    at 0x483C583: operator new[](unsigned long) (in
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==24612==    by 0x546FB2C: std::_MakeUniq<char []>::__array
std::make_unique<char []>(unsigned long) (unique_ptr.h:863)
==24612==    by 0x553EE00: octave_char_matrix_str::load_hdf5(long, char
const*) (ov-str-mat.cc:698)
==24612==    by 0x5A52675: octave_value::load_hdf5(long, char const*)
(ov.h:1321)
==24612==    by 0x5A51008: hdf5_read_next_data_internal(long, char const*,
void*) (ls-hdf5.cc:748)
==24612==    by 0x73E7835: H5G_iterate_cb (H5Gint.c:818)
==24612==    by 0x73EF237: H5G__node_iterate (H5Gnode.c:1002)
==24612==    by 0x7320FC5: H5B__iterate_helper (H5B.c:1165)
==24612==    by 0x732255D: H5B_iterate (H5B.c:1210)
==24612==    by 0x73F546C: H5G__stab_iterate (H5Gstab.c:556)
==24612==    by 0x73F1E68: H5G__obj_iterate (H5Gobj.c:697)
==24612==    by 0x73E8BCE: H5G_iterate (H5Gint.c:892)
==24612== 
==24612== 
==24612== HEAP SUMMARY:
==24612==     in use at exit: 261,635 bytes in 4,145 blocks
==24612==   total heap usage: 186,092 allocs, 181,947 frees, 31,890,069 bytes
allocated
==24612== 
==24612== LEAK SUMMARY:
==24612==    definitely lost: 935 bytes in 61 blocks
==24612==    indirectly lost: 159,921 bytes in 2,727 blocks
==24612==      possibly lost: 688 bytes in 9 blocks
==24612==    still reachable: 100,091 bytes in 1,348 blocks
==24612==                       of which reachable via heuristic:
==24612==                         newarray           : 424 bytes in 1 blocks
==24612==         suppressed: 0 bytes in 0 blocks
==24612== Rerun with --leak-check=full to see details of leaked memory
==24612== 
==24612== For lists of detected and suppressed errors, rerun with: -s
==24612== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
$


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58268>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]