From: "Markus Mottl" <markus.mottl@gmail.com>
To: "Xavier Leroy" <Xavier.Leroy@inria.fr>
Cc: "\"Sayan (Sébastien Li-Thiao-Té)\"" <sayan@crans.org>,
caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Allocating caml lists from C : possible bug on amd64
Date: Mon, 13 Mar 2006 13:53:32 -0500 [thread overview]
Message-ID: <f8560b80603131053p3ec30a69hcb4831d1847617d@mail.gmail.com> (raw)
In-Reply-To: <4415AF18.5070404@inria.fr>
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
On 3/13/06, Xavier Leroy <Xavier.Leroy@inria.fr> wrote:
>
> You haven't declared caml_alloc (include <caml/alloc.h>), so the C
> compiler assumes it returns an int instead of a value, and generates
> wrong code.
Funny that I didn't spot this one. Good to know that one should look out
for this problem when making sure that code remains portable to 64-bit
machines.
I think C-compilers should by default issue a warning on platforms where the
size of int may be different from the size of a pointer instead of silently
inventing a function prototype that is very likely to crash.
Regards,
Markus
[-- Attachment #2: Type: text/html, Size: 927 bytes --]
prev parent reply other threads:[~2006-03-13 18:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-08 22:06 Caml interface with C on x86_64 Li-Thiao-Té Sébastien
2006-03-13 14:53 ` Allocating caml lists from C : possible bug on amd64 "Sayan (Sébastien Li-Thiao-Té)"
2006-03-13 15:13 ` [Caml-list] " Markus Mottl
2006-03-13 15:54 ` "Sayan (Sébastien Li-Thiao-Té)"
2006-03-13 16:39 ` Markus Mottl
2006-03-13 17:42 ` Xavier Leroy
2006-03-13 18:05 ` Li-Thiao-Té Sébastien
2006-03-13 18:53 ` Markus Mottl [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=f8560b80603131053p3ec30a69hcb4831d1847617d@mail.gmail.com \
--to=markus.mottl@gmail.com \
--cc=Xavier.Leroy@inria.fr \
--cc=caml-list@yquem.inria.fr \
--cc=sayan@crans.org \
/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