[FLASH-USERS] XFlash Bug Fixes

Seyit Hocuk seyit at astro.rug.nl
Mon Oct 20 07:27:12 EDT 2008


Hi James,

I am glad you found it though for yourself and everybody else. It is 
especially good that you share this with all of us. Personally, I didn't 
encounter this problem, but might have in the future.

Kind Regards,
Seyit



James Guillochon wrote:
> Hi guys,
>
> Some missing code in one of the XFlash support routines was causing me 
> intermittent problems for a long time, so I figured I'd share the fix 
> in case anyone else was getting the same problem. Basically, whoever 
> wrote the routine forgot to include a couple H5_CLOSE (such as 
> "H5T_CLOSE, datatype") commands, which are necessary to avoid memory 
> leaks! The omissions I found were in the determine_file_version.pro 
> and read_amr.pro routines, both essential to XFlash. Here's the 
> location of the missing commands:
>
> determine_file_version.pro:
> Missing "H5T_CLOSE, datatype" after "H5D_GET_TYPE", should be inserted 
> after "H5D_CLOSE, dataset" line.
> "H5F_CLOSE" command appears inside if statement, it should be OUTSIDE 
> the if statement, otherwise it isn't guaranteed to execute!
>
> read_amr.pro:
> "H5F_CLOSE" command appears inside if statement, it should be OUTSIDE 
> the if statement.
>
> This was causing me a huge headache and a memory corruption issue 
> which would rear itself only occasionally, but would result in the 
> wrong file being read! Very annoying when you're looping over hundreds 
> of dumps...
>




More information about the flash-users mailing list