Created attachment 5974 [details] test-skeleton.c based test case (causes execve to fail with E2BIG). If execve is given an argv with a string that is larger than 131072 (coincidentally the ARG_MAX macro from linux/limits.h) but less than what sysconf(_SC_ARG_MAX) return, execve fails with E2BIG. This does not happen if the total length of the argv strings is greater than ARG_MAX but each is shorter. This is a problem if using "/bin/sh -c", i.e. system(3). I'm not sure if this is a glibc or linux issue but I am reporting it here anyway.
execve is a plain system call.