This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/13280] New: execve(2) does not honor sysconf(_SC_ARG_MAX) in some cases.
- From: "sdrake at xnet dot co.nz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Tue, 11 Oct 2011 08:35:42 +0000
- Subject: [Bug libc/13280] New: execve(2) does not honor sysconf(_SC_ARG_MAX) in some cases.
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13280
Bug #: 13280
Summary: execve(2) does not honor sysconf(_SC_ARG_MAX) in some
cases.
Product: glibc
Version: 2.13
Status: NEW
Severity: critical
Priority: P2
Component: libc
AssignedTo: drepper.fsp@gmail.com
ReportedBy: sdrake@xnet.co.nz
Classification: Unclassified
Host: x86_64-unknown-linux-gnu
Steven Drake <sdrake at xnet dot co.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags| |testsuite+
Created attachment 5974
--> http://sourceware.org/bugzilla/attachment.cgi?id=5974
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.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.