Page 81 of the the OpenGL 2.1 spec states "the value in size is in units of the type returned in type". Mesa 7.0.2, however, returns a count of scalars. I will attach a test program which demonstrates this: it queries a 4x4 matrix and receives a size of 16 instead of 1.
I haven't written a test for it, but eye-balling the code for glGetActiveAttrib makes me suspect that the same bug is present there.
Created attachment 13251 [details]
Demo; requires GLEW and GLUT
gcc -o glsl-size glsl-size.c -Wall -g -lGLEW -lglut -lGL
The choice of versions in Bugzilla is quite out of date. I left the version as unspecified because 7.0.2 (or 7.x) wasn't on the list, but it's stock 7.0.2 rather than CVS.
Fixed in git. Thanks.
sizeof_glsl_type returns the wrong value for GL_FLOAT_MAT4x3: it returns 12 but it should be 16.
Labelled this a dupe of 13753, since the remaining work is incorporated into the patches I posted there (the 2x3 case was also wrong).
*** This bug has been marked as a duplicate of bug 13753 ***
on Feb 27, 2017 at 15:52:57.
(provided by the Example extension).