Bug in ncmpii_sanity_check, version 1.8.1
Sjaardema, Gregory D
gdsjaar at sandia.gov
Thu Nov 30 16:19:40 CST 2017
Not sure if you are still fixing bugs in 1.8.1 and I verified that it doesn’t exist in 1.9.0.pre1, so feel free to ignore…
In the sanity test starting at line 166, there is the following block:
for (i=firstDim; i<(*varp)->ndims; i++) {
#ifdef RELAX_COORD_BOUND
if (start[i] < 0 || start[i] > (*varp)->shape[i]) {
DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
goto fn_exit;
}
if (start[i] == (*varp)->numrecs) {
if (api == API_VAR1) {
/* for var1 APIs, count[0] is considered of 1 */
DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
goto fn_exit;
}
else if (count != NULL && count[i] > 0) {
DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
goto fn_exit;
}
}
#else
if (start[i] < 0 || start[i] >= (*varp)->shape[i]) {
DEBUG_ASSIGN_ERROR(err, NC_EINVALCOORDS)
goto fn_exit;
}
#endif
}
The “(*varp)->numrecs” in the if statement at line 172 should be “(*varp)->shape[i]” I think this is a cut-paste bug where two instances were changed, but the third was missed.
..Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20171130/cba85cbd/attachment.html>
More information about the parallel-netcdf
mailing list