[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #YZD-296984]: Read a vlen array in Fortran

What is odd about the vlen valgrinds is that they do
not appear to show an illegal overwrite of memory.

Turning to the string code, it is clear that the string code
is not calling nc_inq_type with the correct parameters.
I can use gdb and see what is passed in to the underlying
nc_inq_type. The incoming arguments look ok to me. So,
somehow the arguments at the fortran level are not correct.

I am guessing that properly defining and passing
a string as a char* from fortran to c is more complicated
that I know how to do. I have attached a simplified version
that does not use nf_inq_type and uses nf_put_att instead
of nf_put_var. It also assumes that sizeof(char*) is 4.
See comments in the code.
Until we can figure out the proper way to pass a string,
I am stuck.
=Dennis Heimbigner

Ticket Details
Ticket ID: YZD-296984
Department: Support netCDF
Priority: Normal
Status: Open
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.

Attachment: string.f90
Description: Binary data