From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 1B569BB9A for ; Tue, 15 Nov 2005 03:06:24 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAF26Ns6027613 for ; Tue, 15 Nov 2005 03:06:23 +0100 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 DAA06654 for ; Tue, 15 Nov 2005 03:06:22 +0100 (MET) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAF26LWI027610 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 15 Nov 2005 03:06:22 +0100 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EbqCC-0000Rw-8B for caml-list@inria.fr; Tue, 15 Nov 2005 03:05:16 +0100 Received: from 218.18.209.71 ([218.18.209.71]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Nov 2005 03:05:16 +0100 Received: from zuoqian by 218.18.209.71 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 15 Nov 2005 03:05:16 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: xuzq Subject: Re: perl4caml crashed with threads Date: Tue, 15 Nov 2005 02:03:20 +0000 (UTC) Message-ID: References: <20051114100945.GA20179@furbychan.cocan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 218.18.209.71 (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (ax)) Sender: news X-j-chkmail-Score: MSGID : 4379429D.000 on concorde : j-chkmail score : X : 0/20 1 X-Miltered: at concorde with ID 4379429F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4379429D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; threads:01 bug:01 threads:01 thread-safe:01 thread-safe:01 ocaml:01 caml-list:01 ...:98 ffe:98 wrote:01 writes:01 inline:01 int:01 int:01 thread:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=RCVD_BY_IP,RCVD_NUMERIC_HELO autolearn=disabled version=3.0.3 Richard Jones annexia.org> writes: > > On Mon, Nov 14, 2005 at 02:16:43AM +0000, xuzq wrote: > > On my debian sid box,the following prog core dump.What's wrong?Is it > > all right on your machine or is it a bug? > > This crashes on my machine too. However if you remove all references > to threads, then it works. libperl and perl4caml don't make any > attempt to be thread-safe. > > Rich. > Yes,it 's ok without threads and i see perl4caml may not be thread-safe.I 'm only curious about why only "eval" crashes and "call" looks fine.In my program another thread run the following code without any error. let (sv_dbf_sz,sv_dbf_sh)=(call_class_method "CAM::DBF" "new" [sv_of_string path_sz],call_class_method "CAM::DBF" "new" [sv_of_string path_sh]) in let (rn_sz,rn_sh)=(int_of_sv (call_method sv_dbf_sz "nrecords" []),int_of_sv (call_method sv_dbf_sh "nrecords" [])) in for i=0 to rn_sz-1 do let row = call_method_array sv_dbf_sz "fetchrow_array" [sv_of_int i] in match row with ... Thank you for your excellent perl4caml,Richard!Would it be possible for perl to callocaml code just like the Inline::OCaml thoughts in that post: http://caml.inria.fr/pub/ml-archives/caml-list/2002/02/ e363d76f1e9b94779b1ffe7de3a7c011.en.html?