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

crash of h5dump of H5Lexternal.c in function H5L__extern_query #579

Closed
NigelX opened this issue Apr 25, 2021 · 2 comments
Closed

crash of h5dump of H5Lexternal.c in function H5L__extern_query #579

NigelX opened this issue Apr 25, 2021 · 2 comments

Comments

@NigelX
Copy link

NigelX commented Apr 25, 2021

Hi
I found an crash error.

System info:
Ubuntu 20.04 : clang 10.0.0 , gcc 9.3.0

hdf5 version 1.13.0 ,git branch development


Verification steps:
1.Get the source code of hdf5
2.Compile the hdf5

$ cd hdf5
$ mkdir build && cd build
$ cmake ../ -DCMAKE_C_COMPILER=clang  -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=address" -DCMAKE_CXX_FLAGS="-fsanitize=address"
$ make -j 32

3.run h5dump

$ cd bin
$ mkdir crashtest_dir
$ ./h5dump -r -d crashtest_dir/data poc

poc.zip

asan info

AddressSanitizer:DEADLYSIGNAL
=================================================================
==1369613==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000989dfc bp 0x00000000a109 sp 0x7fff1c6e1340 T0)
==1369613==The signal is caused by a READ memory access.
==1369613==Hint: address points to the zero page.
    #0 0x989dfc in H5L__extern_query /home/hh/Downloads/hdf5/src/H5Lexternal.c:287:11
    #1 0x876042 in H5G_link_to_info /home/hh/Downloads/hdf5/src/H5Glink.c:325:35
    #2 0x871d11 in H5G__visit_cb /home/hh/Downloads/hdf5/src/H5Gint.c:1065:9
    #3 0x87767e in H5G__link_iterate_table /home/hh/Downloads/hdf5/src/H5Glink.c:475:21
    #4 0x11eeb0f in H5G__compact_iterate /home/hh/Downloads/hdf5/src/H5Gcompact.c:407:22
    #5 0x898018 in H5G__obj_iterate /home/hh/Downloads/hdf5/src/H5Gobj.c:661:30
    #6 0x87106f in H5G_visit /home/hh/Downloads/hdf5/src/H5Gint.c:1297:14
    #7 0x103fa3f in H5VL__native_link_specific /home/hh/Downloads/hdf5/src/H5VLnative_link.c:362:38
    #8 0xfe90e3 in H5VL__link_specific /home/hh/Downloads/hdf5/src/H5VLcallback.c:5140:22
    #9 0xfe90e3 in H5VL_link_specific /home/hh/Downloads/hdf5/src/H5VLcallback.c:5176:22
    #10 0x976df8 in H5Lvisit_by_name2 /home/hh/Downloads/hdf5/src/H5L.c:2024:22
    #11 0x558472 in traverse /home/hh/Downloads/hdf5/tools/lib/h5trav.c:288:17
    #12 0x55c606 in h5trav_visit /home/hh/Downloads/hdf5/tools/lib/h5trav.c:1057:9
    #13 0x553c25 in init_objs /home/hh/Downloads/hdf5/tools/lib/h5tools_utils.c:793:22
    #14 0x4c460c in table_list_add /home/hh/Downloads/hdf5/tools/src/h5dump/h5dump.c:476:9
    #15 0x4c75c2 in main /home/hh/Downloads/hdf5/tools/src/h5dump/h5dump.c:1549:13
    #16 0x7fee5ecb70b2 in __libc_start_main /build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:308:16
    #17 0x41c60d in _start (/home/hh/Downloads/hdf5/build/bin/h5dump+0x41c60d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/hh/Downloads/hdf5/src/H5Lexternal.c:287:11 in H5L__extern_query
==1369613==ABORTING

Fedora 33

Segmentation fault (core dumped)

Thanks

@byrnHDF
Copy link
Contributor

byrnHDF commented Nov 17, 2022

develop (minor: Address overflowed) is handling this:
HDF5-DIAG: Error detected in HDF5 (1.13.4-1) thread 0:
#000: /HDF_Projects/hdf5/dev/src/H5L.c line 1988 in H5Lvisit_by_name2(): link visitation failed
major: Links
minor: Iteration failed
#1: /HDF_Projects/hdf5/dev/src/H5VLcallback.c line 5517 in H5VL_link_specific(): unable to execute link specific callback
major: Virtual Object Layer
minor: Can't operate on object
#2: /HDF_Projects/hdf5/dev/src/H5VLcallback.c line 5483 in H5VL__link_specific(): unable to execute link specific callback
major: Virtual Object Layer
minor: Can't operate on object
#3: /HDF_Projects/hdf5/dev/src/H5VLnative_link.c line 377 in H5VL__native_link_specific(): link visitation failed
major: Links
minor: Iteration failed
#4: /HDF_Projects/hdf5/dev/src/H5Gint.c line 1244 in H5G_visit(): can't visit links
major: Symbol table
minor: Iteration failed
#5: /HDF_Projects/hdf5/dev/src/H5Gobj.c line 662 in H5G__obj_iterate(): can't iterate over compact links
major: Symbol table
minor: Iteration failed
#6: /HDF_Projects/hdf5/dev/src/H5Gcompact.c line 403 in H5G__compact_iterate(): can't create link message table
major: Symbol table
minor: Unable to initialize object
#7: /HDF_Projects/hdf5/dev/src/H5Gcompact.c line 151 in H5G__compact_build_table(): error iterating over link messages
major: Symbol table
minor: Object not found
#8: /HDF_Projects/hdf5/dev/src/H5Omessage.c line 1174 in H5O_msg_iterate(): unable to iterate over object header messages
major: Object header
minor: Iteration failed
#9: /HDF_Projects/hdf5/dev/src/H5Omessage.c line 1236 in H5O__msg_iterate_real(): unable to decode message
major: Object header
minor: Unable to decode value
#10: /HDF_Projects/hdf5/dev/src/H5Olink.c line 243 in H5O__link_decode(): external link information length < 3
major: Object header
minor: Address overflowed
h5dump error: internal error (file /HDF_Projects/hdf5/dev/tools/src/h5dump/h5dump.c:line 1525)
H5tools-DIAG: Error detected in HDF5:tools (1.13.4) thread 0:
#000:/HDF_Projects/hdf5/dev/tools/lib/h5tools_utils.c line 629 in init_objs(): finding shared objects failed
major: Failure in tools library
minor: error in function
#1: /HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 1052 in h5trav_visit(): traverse failed
major: Failure in tools library
minor: error in function
#2: /HDF_Projects/hdf5/dev/tools/lib/h5trav.c line 284 in traverse(): H5Lvisit_by_name failed
major: Failure in tools library
minor: error in function

@byrnHDF
Copy link
Contributor

byrnHDF commented Nov 21, 2022

No crash as error is handled in current develop

@byrnHDF byrnHDF closed this as completed Nov 21, 2022
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

2 participants