This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/71224] Looping over local copy of aggregate invokes undefined behavior -Waggressive-loop-optimizations


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]