From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA17516; Thu, 14 Oct 2004 15:23:37 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA17542 for ; Thu, 14 Oct 2004 15:23:36 +0200 (MET DST) Received: from kaiserslautern1.lms-gmbh.de (kaiserslautern1.lms-gmbh.de [212.43.68.201]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9EDNZdk019638 for ; Thu, 14 Oct 2004 15:23:35 +0200 Received: by kaiserslautern1.lms-gmbh.de with Internet Mail Service (5.5.2653.19) id ; Thu, 14 Oct 2004 15:23:35 +0200 Message-ID: From: "Bauer, Christoph" To: caml-list@inria.fr Subject: [Caml-list] OCaml-3.08.1/MinGW: alloc_tuple fails Date: Thu, 14 Oct 2004 15:23:33 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4B1F1.0141CA20" X-Miltered: at concorde with ID 416E7DD7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; bauer:01 bauer:01 mingw:01 alloc:01 caml-list:01 alloc:01 bug:01 ocam'ole:01 segfaults:01 mingw:01 camlprim:01 camlparam:01 camllocal:01 val:01 camlreturn:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C4B1F1.0141CA20 Content-Type: text/plain Hi Caml-List, I have a problem with alloc_tuple. Maybe it's a bug, maybe it's me... A program (from the OCam'Ole package) segfaults in a alloc_tuple call. This behavior is shown only with native compilation. Here is a small program to reproduce the problem (OCaml 3.08.1/MinGW): /* test.c */ #include #include CAMLprim value test( value _ ) { CAMLparam1( _ ); CAMLlocal1( t ); int i; t = alloc_tuple( 100 ); for( i=0 ; i < 100; ++i ) Store_field( t, i, Int_val ( i )); CAMLreturn ( Val_unit ); } /* test_it.ml */ external test : unit -> unit = "test" let _ = test () /* compile.sh */ #!/bin/sh -v gcc -mno-cygwin -c -shared -O -mms-bitfields -DCAML_DLL -DDLL=1 -I c:/ocamlmgw/lib test.cpp -D_DEBUG -g gcc -shared -mno-cygwin -mms-bitfields -I C:/ocamlmgw/lib -o dlltest.dll -Wl,--out-implib,libtest.a test.o c:/ocamlmgw/lib/ocamlrun.a chmod 777 dlltest.dll ocamlopt -ccopt dlltest.dll -ccopt -g -o test_it.exe test_it.ml ocamlc -dllib dlltest.dll -ccopt -g -o test_it_bc.exe test_it.ml Thanks for any help, Christoph Bauer ------_=_NextPart_001_01C4B1F1.0141CA20 Content-Type: text/html Content-Transfer-Encoding: quoted-printable OCaml-3.08.1/MinGW: alloc_tuple fails

Hi Caml-List,

I have a problem with alloc_tuple. Maybe it's a bug, = maybe it's me...
A program (from the OCam'Ole package) segfaults in a = alloc_tuple call.
This behavior is shown only with native compilation. = Here is a small
program to reproduce the problem (OCaml = 3.08.1/MinGW):

/* test.c */
#include <caml/alloc.h>
#include <caml/memory.h>

CAMLprim value test( value _ )
{
  CAMLparam1( _ );
  CAMLlocal1( t );
  int i;
  t =3D alloc_tuple( 100 );
  for( i=3D0 ; i < 100; ++i )
    Store_field( t, i, Int_val ( i = ));
  CAMLreturn ( Val_unit );
}

/* test_it.ml */
external test : unit -> unit =3D = "test"

let _ =3D test ()

/* compile.sh */

#!/bin/sh -v
gcc -mno-cygwin -c -shared -O  -mms-bitfields = -DCAML_DLL -DDLL=3D1 -I c:/ocamlmgw/lib test.cpp -D_DEBUG -g
gcc -shared -mno-cygwin -mms-bitfields -I = C:/ocamlmgw/lib -o dlltest.dll -Wl,--out-implib,libtest.a test.o = c:/ocamlmgw/lib/ocamlrun.a

chmod 777 dlltest.dll
ocamlopt -ccopt dlltest.dll -ccopt -g -o test_it.exe = test_it.ml
ocamlc -dllib dlltest.dll -ccopt -g -o = test_it_bc.exe test_it.ml

Thanks for any help,
Christoph Bauer

------_=_NextPart_001_01C4B1F1.0141CA20-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners