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

1 10 changes for sanitize=address #313

Merged
merged 12 commits into from
Feb 5, 2021
2 changes: 1 addition & 1 deletion c++/test/tvlstr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ test_vlstring_dataset()
// Test scalar type dataset with 1 value.
dset1 = root.createDataSet("test_scalar_small", vlst, ds_space);

dynstring_ds_write = (char *)HDcalloc(1, sizeof(char));
dynstring_ds_write = (char *)HDcalloc(2, sizeof(char));
HDmemset(dynstring_ds_write, 'A', 1);

// Write data to the dataset, then read it back.
Expand Down
2 changes: 1 addition & 1 deletion hl/c++/examples/ptExampleFL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ main(void)
if (err < 0)
fprintf(stderr, "Error getting packet count.");

printf("Number of packets in packet table after five appends: %d\n", count);
printf("Number of packets in packet table after five appends: %llu\n", count);

/* Initialize packet table's "current record" */
ptable.ResetIndex();
Expand Down
2 changes: 2 additions & 0 deletions hl/test/test_file_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ test_file_image(size_t open_images, size_t nflags, unsigned *flags)
} /* end for */

/* release temporary working buffers */
for (i = 0; i < open_images; i++)
HDfree(filename[i]);
HDfree(filename);
HDfree(file_id);
HDfree(dset_id);
Expand Down
2 changes: 1 addition & 1 deletion hl/test/test_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ test_table(hid_t fid, int do_write)
/* write the new longitude and latitude information to all the records */
nfields = 2;
start = 0;
nrecords = NRECORDS;
nrecords = NRECORDS_ADD;
if (H5TBwrite_fields_index(fid, "table12", nfields, field_index_pos, start, nrecords,
sizeof(position_t), field_offset_pos, field_sizes_pos, position_in) < 0)
goto out;
Expand Down
18 changes: 9 additions & 9 deletions test/trefer.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ test_reference_region(H5F_libver_t libver_low, H5F_libver_t libver_high)
hssize_t hssize_ret; /* hssize_t return value */
htri_t tri_ret; /* htri_t return value */
herr_t ret; /* Generic return value */
haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
haddr_t addr[2] = {HADDR_UNDEF, 0}; /* test for undefined reference */
hid_t dset_NA; /* Dataset id for undefined reference */
hid_t space_NA; /* Dataspace id for undefined reference */
hsize_t dims_NA[1] = {1}; /* Dims array for undefined reference */
Expand Down Expand Up @@ -1297,14 +1297,14 @@ test_reference_region_1D(H5F_libver_t libver_low, H5F_libver_t libver_high)
static void
test_reference_obj_deleted(void)
{
hid_t fid1; /* HDF5 File IDs */
hid_t dataset, /* Dataset ID */
dset2; /* Dereferenced dataset ID */
hid_t sid1; /* Dataspace ID */
hobj_ref_t oref; /* Object Reference to test */
H5O_type_t obj_type; /* Object type */
haddr_t addr = HADDR_UNDEF; /* test for undefined reference */
herr_t ret; /* Generic return value */
hid_t fid1; /* HDF5 File IDs */
hid_t dataset, /* Dataset ID */
dset2; /* Dereferenced dataset ID */
hid_t sid1; /* Dataspace ID */
hobj_ref_t oref; /* Object Reference to test */
H5O_type_t obj_type; /* Object type */
haddr_t addr[2] = {HADDR_UNDEF, 0}; /* test for undefined reference */
herr_t ret; /* Generic return value */

/* Create file */
fid1 = H5Fcreate(FILE3, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
Expand Down