h5part AT lists.psi.ch
Subject: H5Part development and discussion
List archive
- From: Mark Howison <MHowison AT lbl.gov>
- To: Achim Gsell <achim.gsell AT psi.ch>
- Cc: h5part AT lists.psi.ch
- Subject: [H5part] Re: segfaults in h5_close_mesh
- Date: Thu, 15 Jul 2010 07:41:10 -0700
- List-archive: <https://lists.web.psi.ch/pipermail/h5part/>
- List-id: H5Part development and discussion <h5part.lists.psi.ch>
On Thu, Jul 15, 2010 at 5:53 AM, Achim Gsell <achim.gsell AT psi.ch> wrote:
> Hi Mark,
>
> On Jul 14, 2010, at 12:39 AM, Mark Howison wrote:
>
>> I've been debugging my H5Part regression tests and I've been getting
>> sporadic segfaults during file close that trace through
>> h5_close_mesh() to the h5priv_free() calls. My guess is that some of
>> the pointers in the H5Fed file data are not being initialized but are
>> also not NULL, so the "if(ptr) free(ptr)" logic in h5priv_free isn't
>> working. I'm going to try setting all those pointers to NULL initially
>> in one of the file open calls.
>
> Yes, all pointers should be initialized with NULL. Otherwise I forgot it
> and should be fixed.
Ok, I will check up on where they are being initialized.
>> Another problem I've run into is that an h5_write_mesh call always
>> gets executed at file close regardless of whether the file is opened
>> for writing or reading. If the file is read only, this sets off a
>> CHECK_WRITABLE_MODE error. Can that write be moved?
>
> If you have a good idea where to move it ...
>
> Isn't it sufficient just to add a check and skip the h5_write_mesh call if
> the file was opened read-only?
Yes, that is probably the best solution.
Mark
- [H5part] segfaults in h5_close_mesh, Mark Howison, 07/14/2010
- [H5part] Re: segfaults in h5_close_mesh, Achim Gsell, 07/15/2010
- [H5part] Re: segfaults in h5_close_mesh, Mark Howison, 07/15/2010
- [H5part] Re: segfaults in h5_close_mesh, Achim Gsell, 07/15/2010
Archive powered by MHonArc 2.6.19.