This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/77405] SIGBUS from gnatmake in stage 3 (gcc 7.0)
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Sep 2016 17:56:11 +0000
- Subject: [Bug target/77405] SIGBUS from gnatmake in stage 3 (gcc 7.0)
- Auto-submitted: auto-generated
- References: <bug-77405-4@http.gcc.gnu.org/bugzilla/>
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.