Date: Sat, 07 Dec 2002 11:11:01 -0800 From: Peter Wemm <peter@wemm.org> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: re-builders@FreeBSD.org Subject: Re: ia64 RC1 finished Message-ID: <20021207191101.4E01D2A7EA@canning.wemm.org> In-Reply-To: <20021207171031.GA3576@dhcp01.pn.xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar wrote:
> There are no docs yet. All the required ports were built, but
> ghostscript dumped core. I'll check it out. I also skipped ports
> for now. It's the intention to have both with RC2. I already
> started to send patches to ports maintainers.
I've found that ports are very sensitive to missing prototypes, and
invariably die if a function that returns a pointer is missing its
declaration.
eg, this segfaults (note, no includes):
main()
{
char *a = (char *)malloc(1);
*a = 1;
}
peter@pluto1[11:06am]/tmp-103> cc -o p p.c
p.c: In function `main':
p.c:3: warning: cast to pointer from integer of different size
peter@pluto1[11:06am]/tmp-104> ./p
Segmentation fault (core dumped)
None of our other 64 bit platforms do this. It seems that on sparc64 and
alpha, the called function does any truncation and otherwise returns in a 64
bit register. On ia64 though, the calling function does the truncation and
extension. eg: it takes the "int" result from malloc and zeroes out
bits 32-63 to "extend" it to a 64 bit pointer.
There are lots and lots and lots of ports that simply do the cast like in
the example above rather than try and get the includes right. I suspect
this is going to hurt ia64 a lot more more than time_t stuff. :-(
Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021207191101.4E01D2A7EA>
