Skip to content

Commit

Permalink
Tentative, robust fix for #221 that does not immediately introduce ot…
Browse files Browse the repository at this point in the history
…her issues into ncdump. Broader validation pending.
  • Loading branch information
WardF committed Feb 18, 2016
1 parent bb7b0d3 commit db84f39
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
33 changes: 25 additions & 8 deletions gdb.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
set breakpoint pending on

break nc4hdf.c:872
command
watch provide_fill
c
end

break vardata.c:473
command
watch vals
end


break dumplib.c:1063
command
print len
end

break ncdump.c:1687

break nc4hdf.c:1126

run tst_empty_vlen_unlim.nc

#----------
# Solved first set of problems. On to second, in print_any_val.
#---------
#set breakpoint pending on
#


#break nc4hdf.c:872
#command
#watch provide_fill
#c
#end


#break nc4hdf.c:974
#command
#print fill_value_size
#end

#break nc4hdf.c:1126
6 changes: 5 additions & 1 deletion libsrc4/nc4hdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,11 @@ nc4_get_vara(NC *nc, int ncid, int varid, const size_t *startp,
*(char **)filldata = NULL;
}
else if(var->type_info->nc_type_class == NC_VLEN) {
continue;
if(fillvalue) {
memcpy(filldata,fillvalue,file_type_size);
} else {
*(char **)filldata = NULL;
}
} else
memcpy(filldata, fillvalue, file_type_size);
filldata = (char *)filldata + file_type_size;
Expand Down

0 comments on commit db84f39

Please sign in to comment.