Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Aleksey Nogin <nogin@cs.caltech.edu>
To: caml-list@inria.fr
Subject: [Caml-list] Ocaml program crashes on Opteron
Date: Wed, 12 Nov 2003 15:29:38 -0800	[thread overview]
Message-ID: <3FB2C262.6090908@cs.caltech.edu> (raw)
In-Reply-To: <20030702105950.A6945@pauillac.inria.fr>

I've been trying to use OCaml 3.07 on an Opteron machine running the 
latest Fedora Core development (AKA Red Hat Rawhide) with a binary 
kernel from Mandrake 9.2beta3. I've successfully compiled Ocaml 3.07, 
but when I compile our "omake" system with it, omake segfaults in a 
reproducible fashion (it reliably works for some things and reliably 
crashes for others).

After compiling omake with "ocamlopt.opt -inline 0 -ccopt -g -cc gcc32 
-S -verbose", and then re-running the last linking step with .s files 
instead of .o files (to get debugging information tied to the assembly 
files), I get from gdb:

> ...
> Program received signal SIGSEGV, Segmentation fault.
> Omake_wild__wild_subst_429 () at omake_wild.s:419
> 419             movzbq  -8(%rbx), %rdi
> Current language:  auto; currently asm
> (gdb) bt
> #0  Omake_wild__wild_subst_429 () at omake_wild.s:419
> #1  0x0000002a9557ae00 in ?? ()
> #2  0x000000000044fa02 in List__map_86 ()
> #3  0x0000002a95c9b698 in ?? ()
> #4  0x0000002a9557a508 in ?? ()
> #5  0x0000002a95cdc780 in ?? ()
> #6  0x000000000041df9a in Omake_env__collect_3575 () at omake_env.s:1780
> ...

The relevant part of omake_wild.s is:
> ...
>    .text
>    .align   16
>    .globl   Omake_wild__wild_subst_429
> Omake_wild__wild_subst_429:
>    subq  $8, %rsp
> .L145:
>    movzbq   -8(%rbx), %rdi    <<< it crashes here <<<
>    testq %rdi, %rdi
>    je .L144
> ...

(note that there are no references to L145 in that file) and the Ocaml
code for Omake_wild.wild_subst is:

> let wild_subst (len, s) wild =
>    match wild with
>       WildLiteral node ->
>          WildNode node
>     | WildSplit (plen, prefix, slen, suffix) ->
>          WildString (prefix ^ s ^ suffix)
> 

and it is being called from

>                match search patterns with
>                   Some subst ->
>                      let source_args = List.map (wild_subst subst) sources in

Some additional information (full back trace, register contents, etc) is
available at http://cvs.metaprl.org:12000/bugzilla/show_bug.cgi?id=111

Any guesses as to what might be causing this? Any hints on what I could 
do to invertigate this further?

-- 
Aleksey Nogin

Home Page: http://nogin.org/
E-Mail: nogin@cs.caltech.edu (office), aleksey@nogin.org (personal)
Office: Jorgensen 70, tel: (626) 395-2907

-------------------
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


      parent reply	other threads:[~2003-11-12 23:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-25 15:01 [Caml-list] Ocaml and 64 bit address spaces? Niall Dalton
2003-06-25 15:32 ` Xavier Leroy
2003-06-26 13:02   ` Niall Dalton
     [not found]   ` <3EFB62BE.8050305@cs.caltech.edu>
     [not found]     ` <3EFE0590.5080509@cs.caltech.edu>
     [not found]       ` <20030629180519.A22495@pauillac.inria.fr>
     [not found]         ` <3EFF52E0.7070205@cs.caltech.edu>
     [not found]           ` <20030630105846.A2277@pauillac.inria.fr>
     [not found]             ` <3F00DE2A.9030402@cs.caltech.edu>
     [not found]               ` <20030701110009.C32029@pauillac.inria.fr>
     [not found]                 ` <3F025D79.3010803@cs.caltech.edu>
     [not found]                   ` <20030702105950.A6945@pauillac.inria.fr>
2003-11-12 23:29                     ` Aleksey Nogin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3FB2C262.6090908@cs.caltech.edu \
    --to=nogin@cs.caltech.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox