[Bug middle-end/71224] Looping over local copy of aggregate invokes undefined behavior -Waggressive-loop-optimizations
ibuclaw at gdcproject dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 12 22:04:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71224
Iain Buclaw <ibuclaw at gdcproject dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
Ugh, I've just realised that I still managed to get the condition guard wrong.
So there is indeed a (very, very remote) chance that length would overflow.
Though realloc will overflow and fail first under normal operations. I've
instead gone and fixed it in the upstream library instead.
More information about the Gcc-bugs
mailing list