[LLVMbugs] [Bug 10871] -Warray-bounds fires on usr/include/socket.h ipv6 sockaddr usage

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 6 09:40:08 PDT 2011


Chandler Carruth <chandlerc at gmail.com> changed:

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

--- Comment #1 from Chandler Carruth <chandlerc at gmail.com> 2011-09-06 11:40:08 CDT ---
I think we've reached the limit of what we can do with this warning. The header
file gives an explicit size to the array (14) which is explicitly a lie (as
indicated by the comment). I think Clang is entirely within its rights to
complain here.

However, if the reason you "know" you can overflow this array is because you
"know" that the actual struct is sockaddr_in6, simply cast the pointer ta
sockaddr_in6, and use that struct. =]

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list