Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Nicolas George <nicolas.george@ens.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Strange bug with dynamic loading (was: Text Mode Kit)
Date: Tue, 19 Mar 2002 14:48:04 +0100	[thread overview]
Message-ID: <20020319144804.A3847@clipper.ens.fr> (raw)
In-Reply-To: <20020319143018.A17599@clipper.ens.fr>; from nicolas.george@ens.fr on Tue, Mar 19, 2002 at 01:34:12PM +0000

[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]

Le nonidi 29 ventôse, an CCX, Nicolas George a écrit :
> http://savannah.gnu.org/projects/ocaml-tmk/

This project has a binding for the curses library, and uses the dynamic
loading. But a strange bug appears. With the following program:

open Curses

let main () =
  let w = initscr () in
  assert (cbreak ());
  assert (noecho ());
  assert (move 3 4);
  hline 0 42;
  ignore (getch ());
  assert (move 4 5);
  hline 0 42;
  ignore (getch ());
  endwin ()

let () = main ()

everything works good. But if the first line with getch becomes

  let () = ignore (getch ()) in

the second horizontal lines becomes a line of `q'. Further experiments
show that in some cases, the ncurses library is totally confused after
the first refresh. The problem does not appears when the binding is
statically linked (-custom, -use-runtime or ocamlopt) (but still
dynamically linked to ncurses). All this happens on Linux/i386. On
Solaris/sparc, anything segfaults at startup.

Does anyone here understand what is happening?

[-- Attachment #2: Type: application/pgp-signature, Size: 237 bytes --]

  reply	other threads:[~2002-03-19 13:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-19 13:30 [Caml-list] [Early announce] Text Mode Kit Nicolas George
2002-03-19 13:48 ` Nicolas George [this message]
2002-03-19 14:06   ` [Caml-list] Strange bug with dynamic loading (was: Text Mode Kit) Claudio Sacerdoti Coen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020319144804.A3847@clipper.ens.fr \
    --to=nicolas.george@ens.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox