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

 
 

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

Submitter:  None
Submitted:  Fri 16 Sep 2005 04:19:44 PM UTC
   
 
Category:  xargs Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Wrong result
Status:  Fixed Privacy:  Public
Assigned to:  jay Originator Name:  Eric Blake
Originator Email:  -email is unavailable- Open/Closed:  Closed
Release:  4.2.25 Fixed Release:  4.2.26
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

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

History

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-11-19 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.26
2005-09-17 jay StatusNone Fixed
    Assigned toNone jay
2005-09-16 None Carbon-Copy- Added ebb9 --AT-- byu --DOT-- net

Back to the top

Powered by Savane 3.16-1e6f.
Corresponding source code