| Anonymous | Login | Signup for a new account | 2013-05-20 10:44 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0004756 | OCaml | OCaml general | public | 2009-03-26 16:22 | 2009-04-19 11:10 | |||
| Reporter | rose | |||||||
| Assigned To | weis | |||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||
| Status | closed | Resolution | fixed | |||||
| Platform | OS | OS Version | ||||||
| Product Version | 3.10.2 | |||||||
| Target Version | Fixed in Version | 3.11.1+dev | ||||||
| Summary | 0004756: closure interpreted as string when using %_ in printf routine | |||||||
| Description | The use of "%_s" e.g. in format specifiers for printf routines is probably not allowed, but the routine cannot check this, because the arguments are counted incorrectly by ocaml. If I write in ocaml the phrase Printf.sprintf "Hello %s, how %_s you" "Tom";; the answer is not "Exception ... bad conversion %_ ...", instead a closure is incorrectly returned as string value: val s : string = "\212\168\198 ... \000\000" A detailed description is attached as file 'printf_bug.ml' and a possible fix (the responsible function) is described there. This is a minor bug, because it occurs only, if users compile programs with incorrect format specifications. | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0004863) weis (developer) 2009-03-28 12:35 |
Thank you very much for the detailed bug report. I'm investigating the problem and will let you know the solution I will find. |
|
(0004890) weis (developer) 2009-03-30 12:42 |
I fixed it the simple way: %_s conversion now raises an exception in printf. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2009-03-26 16:22 | rose | New Issue | |
| 2009-03-26 16:22 | rose | File Added: printf_bug.ml | |
| 2009-03-28 12:35 | weis | Note Added: 0004863 | |
| 2009-03-28 12:37 | weis | Assigned To | => weis |
| 2009-03-28 12:37 | weis | Status | new => assigned |
| 2009-03-30 12:42 | weis | Note Added: 0004890 | |
| 2009-03-30 12:43 | weis | Resolution | open => fixed |
| 2009-03-30 12:44 | weis | Status | assigned => closed |
| 2009-04-19 11:10 | xleroy | Fixed in Version | => 3.11.1+dev |
| Copyright © 2000 - 2011 MantisBT Group |