[h5py] 376/455: Work around segfault in HDF5

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:52 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 6523b2868462c23a3bf398ac3190f98a1038f02f
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Fri Jan 29 05:33:58 2010 +0000

    Work around segfault in HDF5
---
 h5py/h5r.pyx               | 3 +++
 h5py/tests/low/test_h5r.py | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/h5py/h5r.pyx b/h5py/h5r.pyx
index 722dfc3..1e9b0c6 100644
--- a/h5py/h5r.pyx
+++ b/h5py/h5r.pyx
@@ -55,9 +55,12 @@ def create(ObjectID loc not None, char* name, int ref_type, SpaceID space=None):
     if ref_type == H5R_OBJECT:
         ref = Reference()
     elif ref_type == H5R_DATASET_REGION:
+        if space is None:   # work around segfault in HDF5
+            raise ValueError("Dataspace required for region reference")
         ref = RegionReference()
     else:
         raise ValueError("Unknown reference typecode")
+
     if space is None:
         space_id = -1
     else:
diff --git a/h5py/tests/low/test_h5r.py b/h5py/tests/low/test_h5r.py
index 312efbb..922aeaa 100644
--- a/h5py/tests/low/test_h5r.py
+++ b/h5py/tests/low/test_h5r.py
@@ -42,7 +42,6 @@ class TestBasic(tests.HTest):
         self.assertIsInstance(sid, h5s.SpaceID)
         self.assertEqual(sid2.get_select_bounds(), sid.get_select_bounds())
 
-    @tests.fixme("segfaults")
     def test_create_exc(self):
         """ (H5R) RegionReference w/no dataspace raises ValueError """
         self.assertRaises(ValueError, h5r.create, self.did, '.', h5r.DATASET_REGION)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list