You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4756 Reporter: rose Assigned to:@pierreweis Status: closed (set by @pierreweis on 2009-03-30T10:44:17Z) Resolution: fixed Priority: normal Severity: minor Version: 3.10.2 Fixed in version: 3.11.1+dev Category: ~DO NOT USE (was: OCaml general)
Bug 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.
Original bug ID: 4756
Reporter: rose
Assigned to: @pierreweis
Status: closed (set by @pierreweis on 2009-03-30T10:44:17Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10.2
Fixed in version: 3.11.1+dev
Category: ~DO NOT USE (was: OCaml general)
Bug 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.
File attachments
The text was updated successfully, but these errors were encountered: