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

HL TB examples are incorrect #5332

Closed
byrnHDF opened this issue Feb 24, 2025 · 2 comments · Fixed by #5333
Closed

HL TB examples are incorrect #5332

byrnHDF opened this issue Feb 24, 2025 · 2 comments · Fixed by #5333
Labels
Component - High-Level Library Code in the hl directory Component - Testing Code in test or testpar directories, GitHub workflows Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Type - Bug / Bugfix Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub

Comments

@byrnHDF
Copy link
Contributor

byrnHDF commented Feb 24, 2025

Fix the expected DDL output value #5128 exposed a failure of the HL package to correctly insert fill data. In addition, because of badly created coding and testing, the issue was masked until the 32-bit testing exposed the problem.

@byrnHDF byrnHDF added Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Component - High-Level Library Code in the hl directory Component - Testing Code in test or testpar directories, GitHub workflows Type - Bug / Bugfix Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub labels Feb 24, 2025
@byrnHDF
Copy link
Contributor Author

byrnHDF commented Feb 24, 2025

In addition - the HL test_table also fails to do the right thing, but the failure is not checked.

@byrnHDF
Copy link
Contributor Author

byrnHDF commented Feb 24, 2025

I'm assuming what's happening is the compound type in memory has some field alignment that doesn't line up with the compound stored in the file and when they use H5Tget_member_offset to get the offset of a particular field, they're assuming it's aligned at the same spot as the in-memory compound, which may not be the case on some platform vs. another. I could be completely wrong, but that's my first intuition.
/* get the member offset */
member_offset = H5Tget_member_offset(tid_3, (unsigned)i);

if (H5TBget_field_info(loc_id, dset_name, NULL, NULL, src_offset, NULL) < 0) is used before this in a call;
/* get the fill value attributes */
if ((H5TBAget_fill(loc_id, dset_name, did_1, tmp_fill_buf)) < 0)

Replacing the src_offset from the H5TBget_field_info fixes the problem

byrnHDF added a commit to byrnHDF/hdf5 that referenced this issue Feb 24, 2025
lrknox pushed a commit that referenced this issue Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - High-Level Library Code in the hl directory Component - Testing Code in test or testpar directories, GitHub workflows Priority - 0. Blocker ⛔ This MUST be merged for the release to happen Type - Bug / Bugfix Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant