Checking large-sized variables has been moved to NC_enddef() as explained in below comments at lines This is most likely caused by git merge failed to delete residue codes.
@@ -484,9 +484,6 @@ NC_var_shape(NC_var *varp, const NC_dimarray *dims)
out :
- /* No variable size can be > X_INT64_MAX - 3 */
- if (0 == NC_check_vlen(varp, (size_t)X_INT64_MAX-3)) return NC_EVARSIZE;
-
/*
* For CDF-1 and CDF-2 formats, the total number of array elements
* cannot exceed 2^32, unless this variable is the last fixed-size
