Fedora rawhide kernels are now flagging use of zero length arrays
The kernel has switched from using zero length arrays to flexible
arrays. The kernel compiles have gotten picker and now flags accesses
beyond the end of end of arrays when possible. When trying to run the
testsuite on Fedora rawhide got the following error due to a zero
length array:
In file included from /tmp/stapaBPtwB/stap_6b7e9ee7df4a3f6e4cfbffb7f92d8405_1736_src.c:543:
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/stp_tracepoint.c: In function 'add_tracepoint':
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/stp_tracepoint.c:148:22: error: 'strcmp' reading 1 or more bytes from a region of size 0 [-Werror=stringop-overread]
148 | if (!strcmp(name, e->name)) {
| ^~~~~~~~~~~~~~~~~~~~~
/home/wcohen/systemtap_write/install/share/systemtap/runtime/linux/stp_tracepoint.c:61:14: note: source object 'name' of size 0
61 | char name[0];
| ^~~~
Switched the zero length array in the struct to a flexible array to
eliminate the issue.