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/77405] SIGBUS from gnatmake in stage 3 (gcc 7.0)


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

--- Comment #26 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to John Marino from comment #25)
> I'm being told (one source) that that 16-byte alignment is not a x86-64 abi
> requirement.  I don't know either way.  Do you have an iron-clad reference
> about this requirement?
> 
> (Yes I know __gnat_malloc is libc malloc)

On Linux, "man malloc" shows

RETURN VALUE
       The malloc() and calloc() functions return a pointer to  the  allocated
       memory,  which  is  suitably  aligned for any built-in type.  On error,
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Since __int128 and long double require 16 byte alignment, malloc should
return memory aligned to 16 bytes.

       these functions return NULL.  NULL may also be returned by a successful
       call  to  malloc() with a size of zero, or by a successful call to cal‐
       loc() with nmemb or size equal to zero.

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