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

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

[Octave-bug-tracker] [bug #60081] loading bad hdf file corrupts memory;


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #60081] loading bad hdf file corrupts memory; segfault at exit
Date: Sun, 21 Feb 2021 11:07:45 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 Edg/88.0.705.74

Update of bug #60081 (project octave):

                  Status:                    None => Patch Submitted        

    _______________________________________________________

Follow-up Comment #5:

It looks like the HDF5 library has issues if the execution is interrupted
inside a function the library is calling.

The attached patch catches the exception and lets the HDF5 library recover
from the error instead. This avoids the crash on exit.

The library seems to be more verbose in this case (at least the HDF5 library
that comes with Ubuntu 20.10). But that is probably ok because an invalid HDF5
file is not the "normal" use case:

octave:1> load("test_matlab_h5write_bad.hdf5")
warning: load: error while reading hdf5 item 'data'
HDF5-DIAG: Error detected in HDF5 (1.10.6) thread 0:
  #000: ../../../src/H5Gdeprec.c line 771 in H5Giterate(): group iteration
failed
    major: Symbol table
    minor: Iteration failed
  #001: ../../../src/H5Gint.c line 854 in H5G_iterate(): error iterating over
links
    major: Symbol table
    minor: Iteration failed
  #002: ../../../src/H5Gobj.c line 698 in H5G__obj_iterate(): can't iterate
over symbol table
    major: Symbol table
    minor: Iteration failed
  #003: ../../../src/H5Gstab.c line 557 in H5G__stab_iterate(): iteration
operator failed
    major: Symbol table
    minor: Can't move to next iterator location
  #004: ../../../src/H5B.c line 1211 in H5B_iterate(): B-tree iteration
failed
    major: B-Tree node
    minor: Iteration failed
  #005: ../../../src/H5B.c line 1167 in H5B__iterate_helper(): B-tree
iteration failed
    major: B-Tree node
    minor: Iteration failed
  #006: ../../../src/H5Gnode.c line 1015 in H5G__node_iterate(): iteration
operator failed
    major: Symbol table
    minor: Can't move to next iterator location
octave:2> exit



(file #50899)
    _______________________________________________________

Additional Item Attachment:

File name: bug60081_hdf5_bad_file.patch   Size:2 KB
   
<https://file.savannah.gnu.org/file/bug60081_hdf5_bad_file.patch?file_id=50899>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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