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

segfault on string array slicing #40

Closed
mfz opened this issue Sep 26, 2013 · 1 comment
Closed

segfault on string array slicing #40

mfz opened this issue Sep 26, 2013 · 1 comment

Comments

@mfz
Copy link

mfz commented Sep 26, 2013

The following code leads to a segfault when trying to slice a string array

using HDF5


# create file
f = h5open("testjl.hdf5", "w")
f["MyStrings"] = ["1231","asdasdad","ffsfd"]
f["MyNumbers"] = [1,2,3]
close(f)

# try to read back
f = h5open("testjl.hdf5", "r")

# seems we can read whole data set 

println(read(f["MyStrings"]))
println(read(f["MyNumbers"]))

# but slicing
# works for numbers
println(f["MyNumbers"][1:2])

# but not for strings - segfault
println(f["MyStrings"][1:2])

close(f)
@timholy
Copy link
Member

timholy commented Sep 26, 2013

Thanks for the bug report. Fixed in master; now it gives an error when you try this. I'm hesitant to release a new version because of some recent important but disruptive changes, but you can switch to master if this matters to you.

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