bugfindutils - Bugs: bug #14550, xargs --help breaks with...

 
 

bug #14550: xargs --help breaks with over-large environ

Submitted by:  None
Submitted on:  Fri 16 Sep 2005 04:19:44 PM UTC  
 
Category: xargsSeverity: 3 - Normal
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Eric BlakeOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.25
Fixed Release: 4.2.26

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 16 Sep 2005 04:19:44 PM UTC, original submission:

Background: A recent cygwin bug report exposed a flaw in some Windows versions - Windows does not document a maximum environment size, only that individual environment variables must not exceed 32k; meanwhile the command line is in independent memory from environ and is capped at 32k. This does not map very well to cygwin and the idea of ARG_MAX. As a result, it is possible to have an environment that exceeds 32k, but which is still seen by the child process. For an example:
$ foo=`perl -e 'print "a"x31000'`
$ export foo
$ /bin/env | wc -c
34664

Bug: xargs ALWAYS tries to calculate its buffer range, prior to parsing argv. As a result, when the environment leads to an impossible situation (such as cygwin having a larger environment than the useful 32k ARG_MAX), --help no longer works:
$ xargs --help
xargs: environment is too large for exec
$ xargs --version
xargs: environment is too large for exec

Instead, xargs should parse argv FIRST, because --help and --version should not fail (since xargs does not have to exec any subprocess).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 5 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 19 Nov 2005 09:46:44 PM UTCjayOpen/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.2.26
Sat 17 Sep 2005 09:54:08 PM UTCjayStatusNone=>Fixed
  Assigned toNone=>jay
Fri 16 Sep 2005 04:19:44 PM UTCNoneCarbon-Copy-=>Added ebb9 --AT-- byu --DOT-- net

Back to the top


Powered by Savane 3.1-cleanup1