[Bug c/80378] Extend alloc_size attribute for better Linux kernel checking
andi-gcc at firstfloor dot org
gcc-bugzilla@gcc.gnu.org
Mon Apr 24 15:43:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80378
--- Comment #8 from Andi Kleen <andi-gcc at firstfloor dot org> ---
__builtin_constant_p does not cover variable range information, which is what
we're looking for here to prevent security bugs.
Also in my experience these explicit expressions tend to be somewhat fragile
and is not well specified. It has to assume that the optimizer does specific
operations which are nowhere guaranteed.
An explicit builtin could be much tighter defined.
More information about the Gcc-bugs
mailing list