[llvm-bugs] [Bug 44975] 'Segmentation fault: 11' in the special index for an array

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 20 12:04:16 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44975

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Richard Smith <richard-llvm at metafoo.co.uk> ---
The array in main is implicitly an array of 1 int (the bound is deduced from
the length of the initializer), so the access in foo is out of bounds, and
hence has undefined behavior. The fact that this sometimes crashes and
sometimes does not is not a compiler bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200220/f12db9a3/attachment.html>


More information about the llvm-bugs mailing list