Opened 8 years ago

Closed 8 years ago

#19 closed defect (wontfix)

Memory leak in NeXus 3.0.0

Reported by: Freddie Akeroyd Owned by:
Priority: major Milestone: NeXus 4.0 Ready
Component: Version:
Keywords: Cc: stephane.poirier@…

Description

Hello all!

Using the NeXus API 3.0.0 and HDF5 (v1.6.5) under GNU/Linux, I have noticed a memory leak in my process recording data in NeXus format. Then I tryed to see what's going wrong with Valgrind, a memory debugging tool. In the listing produced by Valgrind (after a 3 hours test) I read :

==15497== 264256 bytes in 4129 blocks are definitely lost in loss record 185 of 185 ==15497== at 0x3414A23C: malloc (vg_replace_malloc.c:131) ==15497== by 0x80CB15B: NXIformatNeXusTime (napi.c:1017) ==15497== by 0x80CB704: NX5open (napi5.c:146) ==15497== by 0x80CA589: nxiopen_ (napi.c:232)

Looking at the NX5open function in napi5.c I saw that the pointer named 'time_buffer' is allays allocated (using NXIformatNeXusTime()) when calling NX5open but freed only in the case of a NXACC_CREATE5 access (=> H5F_ACC_TRUNC) to the NeXus file.

Thanks,

Stephane

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° Stéphane POIRIER Groupe Gestion des données Tél. : 01 69 35 93 38 SYNCHROTRON SOLEIL Bâtiment Central pièce A1.0.28 L'Orme des Merisiers Saint-Aubin - BP 48 91192 GIF-SUR-YVETTE CEDEX Site Web: <http://www.synchrotron-soleil.fr/> °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

Change History (2)

comment:1 Changed 8 years ago by Freddie Akeroyd

Stephane,

Thank you for your report. This problem has been corrected in the development version of NeXus and the fix will be made availabe in an official release in the near future.

Regards,

Freddie

comment:2 Changed 8 years ago by Peter Peterson

  • Resolution set to wontfix
  • Status changed from new to closed

This is already fixed in the trunk.

Note: See TracTickets for help on using tickets.