HDF5.jl
HDF5.jl copied to clipboard
h5_is_library_threadsafe() gives unreliable results due to unspecified initial value
HDF5.API.h5_is_library_threadsafe()
has an unspecified initial value in src/api/helpers.jl
:
function h5_is_library_threadsafe()
is_ts = Ref{Cuint}()
h5_is_library_threadsafe(is_ts)
return is_ts[] > 0
end
and H5is_library_threadsafe
only updates the low 8 bits:
julia> is_ts=Ref{Cuint}(-1 % Cuint)
Base.RefValue{UInt32}(0xffffffff)
julia> ccall((:H5is_library_threadsafe, HDF5.API.libhdf5), HDF5.API.herr_t, (Ref{Cuint},), is_ts);
julia> is_ts[]
0xffffff00
Would you mind opening a pull request?