-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
Fix assertion failure in H5S__copy_pnt_list() #5352
base: develop
Are you sure you want to change the base?
Conversation
de1f40f
to
293b777
Compare
Foiled again by the linkchecker |
293b777
to
4ba5c1a
Compare
@qkoziol apologies on the timing; realized I should add a release note even though the issue is a minor one. |
|
||
/* Allocate room for the head of the point list */ | ||
if (NULL == (dst = H5FL_CALLOC(H5S_pnt_list_t))) | ||
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate point list node"); | ||
|
||
/* If source dataspace has no extent, just return new point list node */ | ||
if (rank == 0) | ||
HGOTO_DONE(dst); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qkoziol I'm considering revising this. While it makes sense to me to return an empty point list node when the dataspace's extent has 0 dimensions (as we can't even tell how to copy the points over in that case), this causes problems elsewhere where the library expects space->select.sel_info.pnt_lst->head
to be non-NULL. I have a fix for that as well, but I'm thinking of just having H5Scopy()
/ H5Sselect_copy()
return failure for point and hyperslab selection dataspaces with a 0 dimension extent, since they both don't support H5S_SCALAR
or H5S_NULL
dataspaces and can only end up here when H5Sset_extent_none()
is called on them. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be fine. Another solution might be to have H5Sset_extent_none() clear the selection also (since you can't select anything within a "none" extent"). Generically, I would suggest reseting the selection any time that the extent's rank changes (also).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like a better solution to me. I suppose it makes sense to reset the selection to 'all' since that's what dataspaces start with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, back to 'all' for all changes in rank would be consistent with dataspace creation.
No description provided.