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

ocamlc as runaway process under cygwin #3016

Closed
vicuna opened this issue Nov 6, 2001 · 1 comment
Closed

ocamlc as runaway process under cygwin #3016

vicuna opened this issue Nov 6, 2001 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 6, 2001

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

Bug description

hello all.. I am using ocaml 3.01 under cygwin 1.3.2 on win98 on
an Intel PII-333;

when I try to use ocamlc like this:
bash# ocamlc -c foo.mli

on this file:
<foo.mli>
val bar: Faux.garbage

I get the following error, as expected:
File "foo.mli", line 1, characters 9-21:
Unbound type constructor Faux.garbage

But if I change Faux to Aux, like so:
<foo.mli>
val bar: Aux.garbage

Then ocamlc starts eating resources very quickly, and locks
up my computer. This is probably because (since it is running
under the WINOLDAPI) it grabs the GDI and won't let go, but it
still doesn't seem like it should lock up like that.
After a very cursory inspection of the CAML source I didn't
immediately find an Aux structure anywhere. Regardless, the machine
shouldn't die so instantly. The same thing happens when I enter
'val bar = Aux.garbage' into ocaml in interactive mode.
Any ideas why this is happening?

Thanks,
Neil Inala


Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

@vicuna
Copy link
Author

vicuna commented Nov 7, 2001

Comment author: administrator

when I try to use ocamlc like this:
bash# ocamlc -c foo.mli

on this file:
<foo.mli>
val bar: Faux.garbage

I get the following error, as expected:
File "foo.mli", line 1, characters 9-21:
Unbound type constructor Faux.garbage

But if I change Faux to Aux, like so:
<foo.mli>
val bar: Aux.garbage

Then ocamlc starts eating resources very quickly, and locks
up my computer.

Believe it or not, but for backward compatibility with MSDOS, Windows
treat the "aux" filename specially: it is interpreted as a reference
to one of the serial ports (I think). Worse, Windows just ignores the
filename extension, so that aux. is also a reference to the
serial port.

Now, when ocamlc type-checks an access to a component of
another compilation unit, such as Aux.garbage, it reads some type
information from the file aux.cmi. Under Windows, it therefore tries
to read from the serial port, with the consequences you observed.

There is nothing Caml-specific in this problem; other programs suffer
equally under the same circumstances.

Two alternatives: either be very careful with file names ("aux" isn't
the only special name, there's also "con", "prn", "com1", "com2" and a
few others I forgot), or use a real operating system.

  • Xavier Leroy

@vicuna vicuna closed this as completed Nov 7, 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