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 QAA21362; Fri, 16 Jul 2004 16:10:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA20448 for ; Fri, 16 Jul 2004 16:10:50 +0200 (MET DST) Received: from kaiserslautern1.lms-gmbh.de ([212.43.68.201]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i6GEAnEV025333 for ; Fri, 16 Jul 2004 16:10:49 +0200 Received: by kaiserslautern1.lms-gmbh.de with Internet Mail Service (5.5.2653.19) id <3YLJG6A5>; Fri, 16 Jul 2004 16:10:49 +0200 Message-ID: From: "Bauer, Christoph" To: caml-list Subject: [Caml-list] segfault in caml_copy_string Date: Fri, 16 Jul 2004 16:10:47 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C46B3E.B1463810" X-Miltered: at nez-perce with ID 40F7E1E9.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 segfault:01 camlprim:01 camlparam:01 const:01 char:01 camlreturn:01 camlreturn:01 segfault:01 camlprim:01 camlparam:01 const:01 char:01 ocaml: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_01C46B3E.B1463810 Content-Type: text/plain Hi, here is a simple C-function: CAMLprim value getparam(value request, value key) { CAMLparam2(request, key); const char * result; CAMLreturn(key); /* 1 */ CAMLreturn(caml_copy_string("test")); /* 2 */ } Version 1 returns the key and everything works (except that key is not what I need.) Version 2 calls caml_copy_string and this fails. Has anybody a idea why? OCaml Version is 3.08.0. Thanks for help, Christoph Bauer ------_=_NextPart_001_01C46B3E.B1463810 Content-Type: text/html segfault in caml_copy_string

Hi,

here is a simple C-function:

CAMLprim value getparam(value request, value key)
{
  CAMLparam2(request, key);
  const char * result;
  CAMLreturn(key);  /* 1 */
  CAMLreturn(caml_copy_string("test")); /* 2 */
 }

Version 1 returns the key and everything works (except that
key is not what I need.)

Version 2 calls caml_copy_string and this fails. Has anybody a idea why?

OCaml Version is 3.08.0.

Thanks for help,
Christoph Bauer

------_=_NextPart_001_01C46B3E.B1463810-- ------------------- 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