SUMMARY On platforms where the epoll_event struct is padded (>= 64 bit architectures except amd64), the padding is reported uninitialized unless the program explicitly uses memset. STEPS TO REPRODUCE 1. On powerpc64, compile and run #include <sys/epoll.h> int main(int, char **) { epoll_event evt; evt.events = 0; evt.data.ptr = nullptr; epoll_ctl(0, EPOLL_CTL_ADD, 0, &evt); } OBSERVED RESULT The padding is reported as uninitialized. EXPECTED RESULT No error, or an indication that this is mostly harmless.
Do you have a syscall wrapper patch that fixes this, by any chance?
Not yet, I'd need guidance on what would be the desired behaviour for uninitialized padding in the middle of a struct (which is harmless but might leak data if it is blindly copied around). Is there a flag for hiding these warnings, or a separate reporting level?
I filed a similar bug which has a bit more information and a potential patch, marking this as a duplicate (sorry I missed it earlier). *** This bug has been marked as a duplicate of bug 422623 ***