Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006824OCamlstandard librarypublic2015-03-30 13:312016-12-07 11:48
Reporterfrisch 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version4.02.2+dev / +rc1Fixed in Version4.02.2+dev / +rc1 
Summary0006824: Weird behavior with partial application of Format.asprintf.
DescriptionAs illustrated by the code below:

# let f = Format.asprintf "[%i]";;
val f : int -> string = <fun>
# f 1;;
- : string = "[1]"
# f 2;;
- : string = "[1][2]"

which is at odds with:

# let f = Format.sprintf "[%i]";;
val f : int -> string = <fun>
# f 1;;
- : string = "[1]"
# f 2;;
- : string = "[2]"
Tagspatch
Attached Filespatch file icon 0001-PR-6824-fix-buffer-sharing-on-partial-application-of.patch [^] (1,589 bytes) 2015-03-30 14:18 [Show Content]

- Relationships

-  Notes
(0013587)
gasche (administrator)
2015-03-30 14:18
edited on: 2015-03-30 14:19

I think the attached patch fixes the issue. I may merge it on my next merge window.

PS: when reporting format issues it helps if you can test whether it was present on the pre-GADT implementation (4.01 or before) -- if it is clearly a regression of the new engine, the fact that fixing it is a good idea is a no-brainer. It is in this case.

(0013727)
gasche (administrator)
2015-04-26 22:01

Fixed in trunk and 4.02.

- Issue History
Date Modified Username Field Change
2015-03-30 13:31 frisch New Issue
2015-03-30 14:18 gasche Note Added: 0013587
2015-03-30 14:18 gasche File Added: 0001-PR-6824-fix-buffer-sharing-on-partial-application-of.patch
2015-03-30 14:19 gasche Note Edited: 0013587 View Revisions
2015-03-30 17:15 doligez Status new => confirmed
2015-03-30 17:15 doligez Target Version => 4.02.2+dev / +rc1
2015-03-30 17:15 doligez Tag Attached: patch
2015-04-26 22:01 gasche Note Added: 0013727
2015-04-26 22:01 gasche Status confirmed => resolved
2015-04-26 22:01 gasche Fixed in Version => 4.02.2+dev / +rc1
2015-04-26 22:01 gasche Resolution open => fixed
2015-04-26 22:01 gasche Assigned To => gasche
2016-12-07 11:48 xleroy Status resolved => closed
2017-02-23 16:43 doligez Category OCaml standard library => standard library


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker