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 SAA24593; Thu, 14 Oct 2004 18:20:03 +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 SAA24512 for ; Thu, 14 Oct 2004 18:20:02 +0200 (MET DST) Received: from annexia.force9.co.uk (annexia.force9.co.uk [212.56.101.183]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i9EGK103012439 for ; Thu, 14 Oct 2004 18:20:02 +0200 Received: from rich by annexia.force9.co.uk with local (Exim 3.36 #1 (Debian)) id 1CI8KZ-0006bE-00; Thu, 14 Oct 2004 17:19:55 +0100 Date: Thu, 14 Oct 2004 17:19:55 +0100 To: "Bauer, Christoph" Cc: caml-list@inria.fr Subject: Re: [Caml-list] OCaml-3.08.1/MinGW: alloc_tuple fails Message-ID: <20041014161955.GA25356@annexia.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1+cvs20040105i From: Richard Jones X-Miltered: at concorde with ID 416EA731.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 mingw:01 alloc:01 2004:99 bauer:01 alloc:01 val:01 val:01 for-loop:01 crashes:01 ltd:98 ocaml:01 caml:01 ocaml-:01 int:01 X-Attachments: type="application/pgp-signature" name="signature.asc" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 14, 2004 at 04:59:01PM +0200, Bauer, Christoph wrote: >=20 > > > t =3D alloc_tuple( 100 ); > > > for( i=3D0 ; i < 100; ++i ) > > > Store_field( t, i, Int_val ( i )); > >=20 > > s/Int_val/Val_int/ >=20 >=20 > Ok, that's correct. But the problem is before the for-loop. It looks correct to me, but often memory corruption happens earlier than is detected. Try adding a call to Gc.full_major () just before you call your C function. If it crashes in the Gc, then you've got memory corruption, and you'll need to pepper your code with calls to Gc.full_major () to try and narrow it down. Hope that helps anyway, Rich. --=20 Richard Jones. http://www.annexia.org/ http://www.j-london.com/ Merjis Ltd. http://www.merjis.com/ - improving website return on investment Learning Objective CAML for C, C++, Perl and Java programmers: http://www.merjis.com/richj/computers/ocaml/tutorial/ --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFBbqcr4le1M6q9pzoRAlKZAJ0WrzRoAWgC+DwjtpwPS+QDOJEQ6QCgplxz HYaP7YMutBJ2YcfiHo2oEe0= =5zdY -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU-- ------------------- 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