Created attachment 116007 [details] Patch to change _IceVersion* globals to const variables Recent versions of gcc have array bounds checking turned on by default, this leads to build failures of libICE. As the _IceVersionCount variable in ICElibint.h is not declared const the compiler cannot assume that the nested for loop in ProcessConnectionSetup stays within bounds. The simple fix is of course to change the declarations of _IceVersionCount, _IceVersions, and the local variable myVersionCount to const declarations, a patch for which is attached to this bug report. I am however not certain that this does not have any ABI impact. The name of file ICElibint.h suggests there is no ABI impact, but I don't know enough of the library to say with certainty.
Correct, the ABI we intend to export is covered in the header files in the include/X11/ICE/ subdirectory - src/ICElibint.h is considered internal implementation details of the library. This looks reasonable and since no one else has suggested an alternative, nor commented on this, I've gone ahead and pushed to git master so it starts getting a little testing. To ssh://git.freedesktop.org/git/xorg/lib/libICE 8a511da..b1720ed master -> master
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.