This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71224] Looping over local copy of aggregate invokes undefined behavior -Waggressive-loop-optimizations
- From: "ibuclaw at gdcproject dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 12 Jul 2016 22:04:38 +0000
- Subject: [Bug middle-end/71224] Looping over local copy of aggregate invokes undefined behavior -Waggressive-loop-optimizations
- Auto-submitted: auto-generated
- References: <bug-71224-4@http.gcc.gnu.org/bugzilla/>
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.