mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 21:07:40 +08:00
[ocaml] completely disable format strings for now
as it causes crashes/segfaults in GCS, server and messages with OCaml 4.02
This commit is contained in:
@@ -172,12 +172,15 @@ let rec string_of_value = function
|
|||||||
let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format)
|
let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format)
|
||||||
|
|
||||||
(* FIXME temporary solution, the complete formatted_string_of_value function
|
(* FIXME temporary solution, the complete formatted_string_of_value function
|
||||||
causes a segfault in server and GCS *)
|
causes a segfault in server and GCS
|
||||||
|
magic format also cases segfaults with OCaml 4.02, so complety disable this for now
|
||||||
|
*)
|
||||||
let string_of_value_format = fun format v ->
|
let string_of_value_format = fun format v ->
|
||||||
match v with
|
match v with
|
||||||
Float x -> sprintf (magic format) x
|
(*Float x -> sprintf (magic format) x*)
|
||||||
| v -> string_of_value v
|
| v -> string_of_value v
|
||||||
|
|
||||||
|
(* FIXME: causes a segfault in server and GCS. *)
|
||||||
let rec formatted_string_of_value = fun format v ->
|
let rec formatted_string_of_value = fun format v ->
|
||||||
match v with
|
match v with
|
||||||
| Int x -> sprintf (magic format) x
|
| Int x -> sprintf (magic format) x
|
||||||
@@ -733,6 +736,8 @@ module MessagesOfXml(Class:CLASS_Xml) = struct
|
|||||||
try List.assoc field_name values with
|
try List.assoc field_name values with
|
||||||
Not_found ->
|
Not_found ->
|
||||||
default_value field._type in
|
default_value field._type in
|
||||||
|
(* should actually use this here, but it segfaults, so disable format strings for now
|
||||||
|
formatted_string_of_value field.fformat v)*)
|
||||||
string_of_value_format field.fformat v)
|
string_of_value_format field.fformat v)
|
||||||
msg.fields)
|
msg.fields)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user