Skip to content
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

Compatibilité_des_.cmi_produits_par_ocamlc /ocamlcp/ocamlopt #2913

Closed
vicuna opened this issue Aug 20, 2001 · 3 comments
Closed

Compatibilité_des_.cmi_produits_par_ocamlc /ocamlcp/ocamlopt #2913

vicuna opened this issue Aug 20, 2001 · 3 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 20, 2001

Original bug ID: 489
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Bonjour,

est-ce que les fichiers .cmi produits par ocamlc, ocamlcp et ocamlopt
sont censés être identiques/compatibles ?

J'ai l'impression qu'en 3.01, ocamlc et ocamlopt donnent les même .cmi
et que l'on obtient des segfaults si l'on essaye de les melanger avec ceux
produits par ocamlcp. En 3.02, ils sont tous les trois incompatibles.
Est-ce voulu ?

En soi, le comportement de la 3.02 n'est pas vraiment genant (ça rend
l'écriture des Makefile plus difficile, quand même), mais ça vaudrait le
coup de le signaler dans le manuel.

Alain

@vicuna
Copy link
Author

vicuna commented Aug 21, 2001

Comment author: administrator

est-ce que les fichiers .cmi produits par ocamlc, ocamlcp et ocamlopt
sont censés être identiques/compatibles ?

ocamlc et ocamlopt: oui.
ocamlcp: pas forcément (dans le cas où le .ml n'a pas de .mli).

J'ai l'impression qu'en 3.01, ocamlc et ocamlopt donnent les même .cmi
et que l'on obtient des segfaults si l'on essaye de les melanger avec ceux
produits par ocamlcp. En 3.02, ils sont tous les trois incompatibles.
Est-ce voulu ?

La différence ocamlc / ocamlopt doit être vue comme un bug, et je suis
intéressé par un exemple.

  • Xavier

@vicuna
Copy link
Author

vicuna commented Aug 21, 2001

Comment author: administrator

On Tue, 21 Aug 2001, Xavier Leroy wrote:

J'ai l'impression qu'en 3.01, ocamlc et ocamlopt donnent les même .cmi
et que l'on obtient des segfaults si l'on essaye de les melanger avec ceux
produits par ocamlcp. En 3.02, ils sont tous les trois incompatibles.
Est-ce voulu ?

La différence ocamlc / ocamlopt doit être vue comme un bug, et je suis
intéressé par un exemple.

Oops, problème entre la chaise et l'écran, j'utilisais ocamlc 3.02 et
ocamlopt 3.01.

Du coup, les fichiers .cmi produits par ocamlc et ocamlopt sont
effectivement identiques, et incompatibles avec ceux produits par ocamlcp,
mais on a toujours des segfaults (le compilateur accepte des mauvais cmi).

exemple:

record.ml:
let f x = x type 'a t

types.ml=types.mli:
type t and record = t Record.t

test.ml:
Record.f ();;

ocamlopt -c record.ml
ocamlcp -c record.ml
ocamlcp -c types.mli
ocamlopt -c types.ml <--- il faut signaler que types.cmi est mauvais
ocamlopt -c test.ml
ocamlopt -o test.opt record.cmx types.cmx test.cmx
./test.opt
make: *** [do] Segmentation fault

Alain

@vicuna
Copy link
Author

vicuna commented Nov 29, 2001

Comment author: administrator

Was a bug in consistency checking in the ocamlopt linker. Fixed 2001-11-29 by
XL.

@vicuna vicuna closed this as completed Nov 29, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant