caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jonathan Roewen <jonathan.roewen@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlc -output-obj problems
Date: Tue, 15 Nov 2005 20:13:02 +1300	[thread overview]
Message-ID: <ad8cfe7e0511142313x4d824d9cve1fbc5327a04f56f@mail.gmail.com> (raw)
In-Reply-To: <ad8cfe7e0511142132q73a2f35ex6545400d1834d701@mail.gmail.com>

> I should also note: commenting out the printf declaration, it runs fine.
>

Used gdb to trace where it's dying. It's in caml_copy_string().

Here's stacktrace:

(gdb) run
Starting program: /home/jonathan/kernel/kernel.elf

Program received signal SIGSEGV, Segmentation fault.
0x0804b48d in caml_copy_string ()
(gdb) bt
#0  0x0804b48d in caml_copy_string ()
#1  0x0804b54f in caml_alloc_array ()
#2  0x0804b595 in caml_copy_string_array ()
#3  0x08052cfb in caml_sys_get_argv ()
#4  0x080593b2 in caml_interprete ()
#5  0x0804a527 in caml_startup_code ()
#6  0x0804992b in caml_startup ()
#7  0x080498c6 in c_start ()
#8  0x080498ab in main ()

It makes no difference what I set argv to that I pass in. NULL makes
it die in caml_alloc_array(). { 0 } doesn't work, { "" } doesn't, nor
does { "", 0 }, nor does something arbitrary like { "hello", "world"
[, 0] }.

IMO, it sounds like ocamlc -output-obj is doing something funky it
shouldn't (I'm using 3.09.0 btw).

Commenting out the printf assignment thing, it runs fine .. so I'm
very, very suspicious of the compiler at this stage.

Jonathan


  reply	other threads:[~2005-11-15  7:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15  3:52 Jonathan Roewen
2005-11-15  4:23 ` skaller
2005-11-15  5:03   ` Jonathan Roewen
     [not found]     ` <ad8cfe7e0511142131j4c53bae8td7f3af42e6cecf72@mail.gmail.com>
2005-11-15  5:32       ` Jonathan Roewen
2005-11-15  7:13         ` Jonathan Roewen [this message]
2005-11-15  8:14           ` Jonathan Roewen
2005-11-15 13:01             ` Alessandro Baretta
2005-11-15 13:33               ` skaller

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=ad8cfe7e0511142313x4d824d9cve1fbc5327a04f56f@mail.gmail.com \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@yquem.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;
as well as URLs for NNTP newsgroup(s).