https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80166
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- Another problem is that for a negative number, returned value is -1 (error). And thus libsanitizer crashes: ==7910==ERROR: AddressSanitizer: negative-size-param: (size=-4) #0 0x7ff25bcd6a00 in __interceptor_getgroups (/usr/lib64/libasan.so.3+0x50a00) #1 0x4009fb in main /home/marxin/Programming/testcases/pr80166.c:9 #2 0x7ff25b901540 in __libc_start_main (/lib64/libc.so.6+0x20540) #3 0x400899 in _start (/home/marxin/Programming/testcases/get_group+0x400899)