Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003462OCamlOCaml windowspublic2005-02-10 15:072012-09-11 09:43
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionunable to reproduce 
PlatformOSOS Version
Product Version 
Target Version4.00.1+devFixed in Version 
Summary0003462: Crash with ocaml top-level when using Cygwin
DescriptionFull_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:

<cut>
$ ocaml
        Objective Caml version 3.08.2

# ;;
Segmentation fault (core dumped)
</cut>

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
<cut>
# 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
</cut>

I have no idea what's causing it.

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

<cut>
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)
</cut>

Best regards,
Janne


TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003094)
administrator (administrator)
2005-02-10 16:20

> When I run the Ocaml top-level from Cywgwin bash, I get a segfault
> with really simple inputs:
>
> <cut>
> $ ocaml
> Objective Caml version 3.08.2
>
> # ;;
> Segmentation fault (core dumped)
> </cut>
>
> 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

(0003095)
administrator (administrator)
2005-02-10 17:57

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:
>>
>><cut>
>>$ ocaml
>> Objective Caml version 3.08.2
>>
>># ;;
>>Segmentation fault (core dumped)
>></cut>
>>
>>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
>
>

(0003096)
administrator (administrator)
2005-03-03 14:25

Recurrent Cygwin issue, probably with termcap/terminfo. Cannot reproduce.
(0008056)
doligez (administrator)
2012-09-11 09:43

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).

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue
2012-07-11 17:29 doligez Target Version => 4.01.0+dev
2012-07-11 17:29 doligez Description Updated View Revisions
2012-07-29 18:02 frisch Category OCaml general => OCaml windows
2012-07-31 13:37 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-11 09:43 doligez Note Added: 0008056
2012-09-11 09:43 doligez Status acknowledged => resolved


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker