New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialisation des objets #3803
Comments
Comment author: administrator La table des methodes contient des pointeurs null a la fin (null_item type item;;type item let null_item : item = Obj.obj (Obj.field (Obj.repr 0n) 1) ;;val null_item : item = Marshal.to_string null_item [];;Exception: Invalid_argument "output_value: abstract value (outside heap)".
Le 05/10/05, Alain.Frisch@inria.frAlain.Frisch@inria.fr a écrit :
|
Comment author: administrator
Comme le remarque Fabrice, le code de serialisation ne semble pas aimer NULL. Jacques |
Comment author: administrator Fixed by JG in camlinternalOO.ml (2005-10-06) |
Original bug ID: 3803
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Hello,
Ce bout de code:
Marshal.to_string (object method x = 2 method y = 3 method z = 4 end)
[Marshal.Closures];;
provoque:
Fatal error: exception Invalid_argument("output_value: abstract value
(outside heap)")
avec ocamlc et ocamlopt. Le programme suivant:
for i = 0 to 65 do
let oc = open_out "bugger.ml" in
Printf.fprintf oc "Marshal.to_string (object ";
for j = 1 to i do
Printf.fprintf oc "method x%i = () " j;
done;
Printf.fprintf oc "end) [Marshal.Closures];;";
close_out oc;
ignore (Sys.command "ocamlc -o bugger bugger.ml");
if (Sys.command "./bugger 2&>1 > /dev/null" = 0) then Printf.eprintf
"i=%i\n" i; flush stderr;
done
permet de conjecturer que ça marche si et seulement le nombre de
méthodes est une puissance de 2.
-- Alain
The text was updated successfully, but these errors were encountered: