[Bug target/94158] Expanded strlen causes out-of-bounds read on AMD64 target
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 12 22:25:40 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94158
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Parker Thompson from comment #3)
> As for alloc alignment, glibc strdup() does not use aligned_alloc, just
> malloc. Which by my read of the spec does not guarantee alignment.
malloc requires alignement of alignof(max_align_t) (definition in the newest C
and C++ standards) but beforehand it was required to be aligned enough to
support all standard types.
More information about the Gcc-bugs
mailing list