From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id D23A7BB84 for ; Tue, 3 Jun 2008 05:09:21 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak8DAKpSREjRVZKzc2dsb2JhbACCOTSPFQEMAwQECQ8FllWGIQ X-IronPort-AV: E=Sophos;i="4.27,581,1204498800"; d="scan'208";a="13402658" Received: from wa-out-1112.google.com ([209.85.146.179]) by mail3-smtp-sop.national.inria.fr with ESMTP; 03 Jun 2008 05:09:20 +0200 Received: by wa-out-1112.google.com with SMTP id j4so627500wah.3 for ; Mon, 02 Jun 2008 20:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=q91VSJCbMZDYeRn+6Ox8mHPzb1w26aa814PrqGq8voE=; b=K4TO4FfB2qW7A4gPcXkpzW4TbgEaoja2HBVS21VJBRRJnn/njQTwXEukKo9BG0k7oDLVN/uOFksktRGfP1S68rOuWZyqZuLLFVbJgBeKS1zVldcnOqtO03xVzpxnSwKlcJV5aYKASbSf3HhEnsyhAKA9ueC+crgtqM1W6eud9R8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=x+vRqbOxHTyeTT962fjle41p0cUqU4jURkj8U1TwCqYR1qWiLLYvjZt42hk1pHHJHaUN772WWOG03F5dUSzdGVVimsiRqvP6E55vjKLYzT2wcHNcJ0Cy5bPMx/hL/ltNUB6ejgAWU1MQ4xsDqsdE/NqkkK5KMwK0ir4B29sPa/k= Received: by 10.114.89.1 with SMTP id m1mr5298269wab.146.1212462558164; Mon, 02 Jun 2008 20:09:18 -0700 (PDT) Received: by 10.114.127.8 with HTTP; Mon, 2 Jun 2008 20:09:18 -0700 (PDT) Message-ID: Date: Mon, 2 Jun 2008 23:09:18 -0400 From: "Jacques Le Normand" To: caml-list@yquem.inria.fr Subject: Segmentation fault MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_363_31274263.1212462558168" X-Spam: no; 0.01; segfault:01 ocaml:01 segfault:01 foo:01 foo:01 endline:01 endline:01 ocaml:01 bottle:98 bottles:98 bottle:98 bottles:98 papa:98 papa:98 W6:98 ------=_Part_363_31274263.1212462558168 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello caml-list, I'm encountering a segfault on ocaml 3.09 The test case seems long, but if I remove any line from it it stops segfaulting. The strangest thing is that get_right_sibling_specific is called, though it appears nowhere. If you change it's name, the segfault dissapears. Any help would be appreciated! here's the code: class virtual bottle_environment = object method virtual gladiators : string list method virtual bottles : bottle list end and virtual bottle = object method virtual action : (unit -> bottle_environment option) end type outer_space = { foo : int list } let empty_outer_space = { foo = []; } class virtual expression = object method virtual get_silly_bottle : bottle end class virtual expression_skel = object(self) inherit expression method bambam = empty_outer_space method get_silly_bottle = (object inherit bottle method action () = Some (object method gladiators = print_endline "entering bottles"; ignore (self#bambam.foo); ["enter "] method bottles = [] end) end) end class virtual baggy_expression_skel = object(self) inherit expression_skel method get_bottle_environment = object method gladiators = ([]:string list) method bottles = [self#get_silly_bottle] end end class virtual papa_expression_skel = object(self) method get_right_sibling_specific = print_endline "im being called, though I shouldn't" ; (None:expression option) inherit expression end class papa_baggy_expression = object(self) inherit baggy_expression_skel inherit papa_expression_skel end class top_baggy_expression = object(self) inherit baggy_expression_skel end let _ = let body_expression = new top_baggy_expression in let e = new papa_baggy_expression in ignore ((body_expression#get_bottle_environment)#bottles); let sugg = e#get_silly_bottle in match sugg#action () with | None -> () | Some y -> ignore (y#gladiators) ------=_Part_363_31274263.1212462558168 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello caml-list,

I'm encountering a segfault on ocaml 3.09

The test case seems long, but if I remove any line from it it stops segfaulting. The strangest thing is that get_right_sibling_specific is called, though it appears nowhere. If you change it's name, the segfault dissapears. Any help would be appreciated!
here's the code:

class virtual bottle_environment =
object
  method virtual gladiators : string list
  method virtual bottles : bottle list
end
and virtual bottle =
object
  method virtual action : (unit -> bottle_environment option)
end

type outer_space = {
    foo : int list
}
let empty_outer_space =
  {

    foo = [];
     
  }

class virtual  expression =
object
  method virtual get_silly_bottle : bottle
end
class virtual  expression_skel =
object(self)
  inherit  expression
  method bambam = empty_outer_space
  method get_silly_bottle =
  (object
     inherit bottle
     method action () =
       Some (object
           method gladiators =          
         print_endline "entering bottles";
         ignore (self#bambam.foo);
         ["enter "]
           method bottles =

         []
         end)
   end)
end
 

class virtual baggy_expression_skel =
object(self)
  inherit expression_skel
  method get_bottle_environment =
  object
    method gladiators = ([]:string list)
    method bottles =       [self#get_silly_bottle]
  end
end
 
class virtual  papa_expression_skel =
object(self)
  method get_right_sibling_specific = print_endline "im being called, though I shouldn't" ; (None:expression option)
  inherit  expression
end

class papa_baggy_expression =
object(self)
  inherit baggy_expression_skel
  inherit papa_expression_skel
end
     
class top_baggy_expression =
object(self)
  inherit baggy_expression_skel
end

let _ =
  let body_expression  = new top_baggy_expression   in
  let e = new papa_baggy_expression   in
    ignore ((body_expression#get_bottle_environment)#bottles);
    let sugg = e#get_silly_bottle in
      match sugg#action () with
    | None -> ()
    | Some y ->
        ignore (y#gladiators)
         



 
     
     

------=_Part_363_31274263.1212462558168--