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

Ocamlopt produces segfaulting executables when the file is named using an existing module #3100

Closed
vicuna opened this issue Aug 25, 2004 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 25, 2004

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

Bug description

Full_Name: Samuel Mimram
Version: 3.08.1
OS: linux
Submission from: babasse.csbnet.se (193.11.251.151)

Hello,

When a file is named using an existing module name the compilation leads to a
segfaulting executable:

% cat toto.ml
let a = Array.make 10 0.0 ;;
let a = Array.append a a ;;
% ocamlopt toto.ml -o toto
% ./toto
% cp toto.ml array.ml
% ocamlopt array.ml -o array
% ./array
zsh: segmentation fault ./array

It seems that is due to the fact that ocaml's array.cmi is used at
compilation-time but my array.cmi is used when linking. Of course if I try to
compile array.ml again I get:

% ocamlopt array.ml -o array
The files array.cmi and array.cmi make inconsistent assumptions
over interface Array

Maybe it should not be considered as a bug but at least some kind of warning
would be nice.

Thanks.

Regards,

Samuel.

@vicuna
Copy link
Author

vicuna commented Jul 31, 2005

Comment author: administrator

see also #3304, #3457
Problem is with the "self reference" Array.make inside array.ml.
Self references now ruled out in 3.09. XL, 2005-07-31.

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