Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006473OCamlOCaml standard librarypublic2014-06-27 16:312014-07-11 13:23
Reporteryallop 
Assigned Toweis 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Versionafter-4.02.0Fixed in Version 
Summary0006473: Leak in fscanf
Description(Reported by Jean-Vincent Loddo on caml-list).

The 'memo' table in the Scanf module associates a lookahead buffer with each input channel:

   https://github.com/ocaml/ocaml/blob/49d3f7b9f/stdlib/scanf.ml#L393 [^]

as explained by a comment in the Scanf code:

   https://github.com/ocaml/ocaml/blob/49d3f7b9f/stdlib/scanf.ml#L268-L320 [^]

Entries are added to the table for each input channel used for scanning, but there's no mechanism for removing entries, so the table only increases in size, retaining references to previously-used channels.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0011781)
weis (developer)
2014-06-29 20:22

Thank you for the bug report.

This problem was due to a short sighted implementation of Scanning.close_in. In the next version, calling Scanning.close_in ic will release the data associated with ic in the memo table.

- Issue History
Date Modified Username Field Change
2014-06-27 16:31 yallop New Issue
2014-06-29 20:22 weis Note Added: 0011781
2014-06-29 20:22 weis Assigned To => weis
2014-06-29 20:22 weis Status new => assigned
2014-07-11 13:23 doligez Target Version => after-4.02.0


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker