STINNER Victor <vstin...@python.org> added the comment:
> NGROUPS_MAX is 65536 and sizeof(gid_t) is 4 on Ubuntu 20.04, so grouplist is > 262144bytes. Oops, that's a lot! Nicely spotted! Yeah, it's perfectly fine to allocate a temporary array on the heap memory. There is no need to micro-optimize this function. Maybe the code was written when NGROUPS_MAX was way smaller (64?). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46606> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com