NVIDIA/libglvnd

Compile problem with version 1.2.0 of libglvnd: "array subscript [0, 2] is outside array bounds of ‘char *[3]’ [-Werror=array-bounds]"

Closed this issue · 1 comments

When running "make" I got the following error:

make[1]: Entering directory '/Depot/jjjj/libglvnd-1.2.0'
Making all in src
make[2]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src'
Making all in util
make[3]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/util'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/util'
Making all in GLdispatch
make[3]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch'
Making all in vnd-glapi
make[4]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch/vnd-glapi'
make all-am
make[5]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch/vnd-glapi'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch/vnd-glapi'
make[4]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch/vnd-glapi'
make[4]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch'
make[3]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/GLdispatch'
Making all in OpenGL
make[3]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/OpenGL'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/OpenGL'
Making all in EGL
make[3]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/EGL'
make all-am
make[4]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/EGL'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/EGL'
make[3]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/EGL'
Making all in GLX
make[3]: Entering directory '/Depot/jjjj/libglvnd-1.2.0/src/GLX'
CC libGLX_la-libglx.lo
libglx.c: In function ‘glXGetClientString’:
libglx.c:1448:40: error: array subscript [0, 2] is outside array bounds of ‘char *[3]’ [-Werror=array-bounds]
1448 | free(dpyInfo->clientStrings[index]);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
libglx.c:1449:35: error: array subscript [0, 2] is outside array bounds of ‘char *[3]’ [-Werror=array-bounds]
1449 | dpyInfo->clientStrings[index] = NULL;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:539: libGLX_la-libglx.lo] Error 1
make[3]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src/GLX'
make[2]: *** [Makefile:400: all-recursive] Error 1
make[2]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0/src'
make[1]: *** [Makefile:489: all-recursive] Error 1
make[1]: Leaving directory '/Depot/jjjj/libglvnd-1.2.0'
make: *** [Makefile:398: all] Error 2

I do not know why. My local gcc is version 9.2.0, most of
my components are quite new/recent, glibc is 2.29, linux
kernel version is 4.19.59.

Not sure where the problem is, but I just report this either
way so that the information is available.

Thanks for reading either way.

@rubyFeedback - We're migrating libglvnd over to Freedesktop -- can you post this bug report over there? The new site is at:
https://gitlab.freedesktop.org/glvnd/libglvnd