This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/77330] __float128 segfaults on 32-bit x86 due to 8-byte malloc alignment


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77330

--- Comment #5 from mikulas at artax dot karlin.mff.cuni.cz ---
And if you add a new type __float256 with 32-byte alignment - does it mean that
glibc suddenly starts being buggy, because it couldn't anticipate what types
with what alignment will be added in the future? In this situation, GCC broke
it by adding new types, glibc didn't.

GCC works on wide range of systems, not only on glibc - how are you going to
patch malloc alignment in all those libc's that GCC supports?

On i386 ABI, the types long long and double have 4-byte alignment and GCC has
to deal with it, it can't expect that they are aligned on 8-byte boundary.
Similarly, GCC should deal with __float128 and _Decimal128.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]