bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

_obstack_begin alignment / gnu-smalltalk bug


From: Benno
Subject: _obstack_begin alignment / gnu-smalltalk bug
Date: Sat, 29 May 2004 15:55:03 +1000
User-agent: Mutt/1.5.5.1+cvs20040105i

Hi all,

I have a bug with either gnu-smalltalk, or glibc on ia64 platform.
It stems from the fact that ia64's long doubles are 128bit aligned, not
64bit.

The problem is that _obstack_begin from glibc returns things that are
not aligned enough to put long doubles in.

This could be because gnu-smalltalk calls it with '0' alignment and hence gets
a default alignment, which is only 8 bytes, not 16 bytes, however, I think
that _obstack_begin should in this case allocate memory that is 16 byte aligned
so that it can hold a long double. (But I can't find any documentation on
what _obstack_begin is *meant* to do).

Assuming the bug is glibc, which I think it is then the patch is something
along the lines of:

struct fooalign {char x; double d;};
                         ^--- this should be long double.

(near the top of malloc/obstack.h)

Of course smalltalk has this same code in their copy of obstack.c

If obstack is only meant to return 8 byte aligned stuff then the fix needs
to be somewhere in gnu-smalltalk's obstack.h

Cheers,

Benno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]