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

Crash with ocaml top-level when using Cygwin #3462

Closed
vicuna opened this issue Feb 10, 2005 · 4 comments
Closed

Crash with ocaml top-level when using Cygwin #3462

vicuna opened this issue Feb 10, 2005 · 4 comments

Comments

@vicuna
Copy link

vicuna commented Feb 10, 2005

Original bug ID: 3462
Reporter: administrator
Status: closed (set by @xavierleroy on 2015-12-11T18:08:04Z)
Resolution: unable to duplicate
Priority: normal
Severity: minor
Target version: 4.00.1+dev
Category: platform support (windows, cross-compilation, etc)

Bug description

Full_Name: Janne Hellsten
Version: 3.08.2
OS: Windows XP
Submission from: 195.170.158.1 (195.170.158.1)

I bootstrapped Ocaml with

./configure --prefix /home/janne/ocaml
make world.opt
make install

When I run the Ocaml top-level from Cywgwin bash, I get a segfault with really
simple inputs:

$ ocaml Objective Caml version 3.08.2

;;

Segmentation fault (core dumped)

It appears that when it hits a syntax error, the whole top-level segfaults.

When I run the top-level from Emacs, everything works as expected (e.g., the
syntax error message is output properly).

The same thing happens with 3.08.1 as well.

When I run it through GDB, I get this

foo;;

 48 [main] ocaml 580 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
640 [main] ocaml 580 open_stackdumpfile: Dumping stack trace to

ocamlrun.exe.s
tackdump

I have no idea what's causing it.

Just in case it's GCC related, here's the output of gcc --v:

Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry Thread model: posix gcc version 3.3.3 (cygwin special)

Best regards,
Janne

@vicuna
Copy link
Author

vicuna commented Feb 10, 2005

Comment author: administrator

When I run the Ocaml top-level from Cywgwin bash, I get a segfault
with really simple inputs:

$ ocaml Objective Caml version 3.08.2

;;

Segmentation fault (core dumped)

It appears that when it hits a syntax error, the whole top-level segfaults.

Yes, it crashes when trying to highlight the location of the error.

Several users reported this problem but we've never been able to
reproduce it. It seems to come from a bug in some versions of the
"curses" library provided by Cygwin. Upgrading Cygwin (and rebuilding
OCaml just to make sure) fixed the problem for at least one user.

A quick workaround is to disable error highlighting by invoking ocaml
as follows:

  TERM=dumb ocaml

Regards,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Feb 10, 2005

Comment author: administrator

This does not really bother me, I just wanted to report it in case it
had not been reported earlier. A note about Cygwin: it happened on two
different Cygwin installations, both relatively recent (the other one
installede from scratch yesterday, other ~week old).

Best regards,
Janne

Xavier Leroy wrote:

When I run the Ocaml top-level from Cywgwin bash, I get a segfault
with really simple inputs:

$ ocaml Objective Caml version 3.08.2

;;

Segmentation fault (core dumped)

It appears that when it hits a syntax error, the whole top-level segfaults.

Yes, it crashes when trying to highlight the location of the error.

Several users reported this problem but we've never been able to
reproduce it. It seems to come from a bug in some versions of the
"curses" library provided by Cygwin. Upgrading Cygwin (and rebuilding
OCaml just to make sure) fixed the problem for at least one user.

A quick workaround is to disable error highlighting by invoking ocaml
as follows:

 TERM=dumb ocaml

Regards,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Mar 3, 2005

Comment author: administrator

Recurrent Cygwin issue, probably with termcap/terminfo. Cannot reproduce.

@vicuna
Copy link
Author

vicuna commented Sep 11, 2012

Comment author: @damiendoligez

This problem has disappeared with more recent versions of Cygwin and OCaml (tested with 3.12.1 and 4.00.0 on a 2012-era Cygwin).

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added this to the 4.00.1 milestone Mar 14, 2019
@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
Projects
None yet
Development

No branches or pull requests

1 participant