https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70588

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |16994

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
I should add that the test case in comment #0 isn't the best.  It just squeaks
by in 4.9.3 because of the optimization.  Without optimization, it crashes too.
 This is because the code that implements the bounds overflow detection has a
bug that prevents it from reliably detecting the SIZE_MAX / 2 + 1 case.  It
works correctly for larger values (SIZE_MAX / 2 + 2 to SIZE_MAX) but only for
one-dimensional VLAs, and fails for things like char a[2][N] for very large N.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16994
[Bug 16994] [meta-bug] VLA and C++

Reply via email to