Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007235OCamlstandard librarypublic2016-04-20 16:242018-06-07 17:21
Reporterfuruse 
Assigned Toweis 
PrioritynormalSeverityminorReproducibilityalways
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version4.02.3 
Target VersionFixed in Version 
Summary0007235: Format only flushes std_formatter by at_exit.
DescriptionI have just noticed that the following code of stdlib/format.ml:

(* Output everything left in the pretty printer queue at end of execution. *)
let () = at_exit print_flush

This code only flushes Format.std_formatter. I am not sure it is easily possible to flush all the formatters associated with out_channels alive when at_exit is called but at least we can flush Format.err_formatter here too.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0019166)
weis (developer)
2018-06-07 17:21

Thank for the report.

Indeed, we should also flush err_formatter at end of program.

Extending this benavior to all formatters created by the library is more problematic since it could lead to excessive memory consumption (keeping track of all allocated formatters in a list or adding a closure for each new formatter to the list of thunks to execute at exit).

- Issue History
Date Modified Username Field Change
2016-04-20 16:24 furuse New Issue
2016-04-21 10:44 doligez Status new => acknowledged
2016-04-21 10:44 doligez Target Version => 4.03.1+dev
2017-02-16 14:00 doligez Target Version 4.03.1+dev => undecided
2017-02-23 16:29 doligez Assigned To => weis
2017-02-23 16:29 doligez Status acknowledged => assigned
2017-02-23 16:29 doligez Target Version undecided =>
2017-02-23 16:43 doligez Category OCaml standard library => standard library
2018-06-07 17:21 weis Note Added: 0019166


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker