caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocaml VM segfault
@ 2001-04-03 17:08 David Fox
       [not found] ` <Pine.BSF.4.21.0104031020470.6163-100000@shell5.ba.best.com>
  0 siblings, 1 reply; 3+ messages in thread
From: David Fox @ 2001-04-03 17:08 UTC (permalink / raw)
  To: caml-list

The following program segfaults when I compile it with ocamlc version 3.01:

  type 'a declarator = {ml: string; t: 'a}
  
  type 'a cdecl =
      Declare of 'a declarator
    | Macro of 'a declarator
  
  type ctype = String | Char
  
  let caml_code decl =
    match decl with
      (Declare {ml=mname; t=ctype} | Macro {ml=mname; t=ctype}) ->
        match ctype with String -> mname
        | _ -> ""
  
  let _ = caml_code (Declare {ml="getenv"; t=String})
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] ocaml VM segfault
       [not found] ` <Pine.BSF.4.21.0104031020470.6163-100000@shell5.ba.best.com>
@ 2001-04-03 17:33   ` David Fox
  2001-04-03 18:28     ` Luc Maranget
  0 siblings, 1 reply; 3+ messages in thread
From: David Fox @ 2001-04-03 17:33 UTC (permalink / raw)
  To: Brian Rogoff; +Cc: caml-list

Oh drat, the problem doesn't occur with the distribution RPMs, only
with the ones I rebuilt from source.  Maybe a glibc header file thing.

Brian Rogoff writes:
 > Which platform? Compiled and ran fine for me on Solaris. Of course, it
 > doesn't really do anything :-)
 > 
 > -- Brian
 > 
 > On 3 Apr 2001, David Fox wrote:
 > 
 > > The following program segfaults when I compile it with ocamlc version 3.01:
 > > 
 > >   type 'a declarator = {ml: string; t: 'a}
 > >   
 > >   type 'a cdecl =
 > >       Declare of 'a declarator
 > >     | Macro of 'a declarator
 > >   
 > >   type ctype = String | Char
 > >   
 > >   let caml_code decl =
 > >     match decl with
 > >       (Declare {ml=mname; t=ctype} | Macro {ml=mname; t=ctype}) ->
 > >         match ctype with String -> mname
 > >         | _ -> ""
 > >   
 > >   let _ = caml_code (Declare {ml="getenv"; t=String})
 > > -------------------
 > > To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr
 > > 

--
David Fox            http://hci.ucsd.edu/dsf		xoF divaD
UCSD HCI Lab          dsfox@cogsci.ucsd.edu          baL ICH DSCU
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] ocaml VM segfault
  2001-04-03 17:33   ` David Fox
@ 2001-04-03 18:28     ` Luc Maranget
  0 siblings, 0 replies; 3+ messages in thread
From: Luc Maranget @ 2001-04-03 18:28 UTC (permalink / raw)
  To: David Fox; +Cc: Brian Rogoff, caml-list

> 
> Oh drat, the problem doesn't occur with the distribution RPMs, only
> with the ones I rebuilt from source.  Maybe a glibc header file thing.
> 
No.
This is indeed a bug, in the byte-code compiler only (ocamlc...)
The bug shows up when you use several variables in a or-pattern.


It is corrected in the developement release.

Sorry for the trouble.

--Luc





> David Fox            http://hci.ucsd.edu/dsf		xoF divaD
> UCSD HCI Lab          dsfox@cogsci.ucsd.edu          baL ICH DSCU
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr
> 

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-03 18:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-03 17:08 [Caml-list] ocaml VM segfault David Fox
     [not found] ` <Pine.BSF.4.21.0104031020470.6163-100000@shell5.ba.best.com>
2001-04-03 17:33   ` David Fox
2001-04-03 18:28     ` Luc Maranget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).