bugfindutils - Bugs: bug #16738, find does not subtract environment...

 
 

bug #16738: find does not subtract environment size from ARG_MAX

Submitted by:  Geoff Clare <geoffclare>
Submitted on:  Fri 02 Jun 2006 04:52:48 PM UTC  
 
Category: findSeverity: 4 - Important
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Geoff ClareOpen/Closed: Closed
Release: 4.2.27Fixed Release: 4.2.28

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 05 Aug 2006 05:47:23 PM UTC, comment #2:

Fixed in the development code. The bug will be fixed in releases 4.2.28 (stable branch) and 4.3.1 (unstable branch).

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 22 Jul 2006 11:45:46 AM UTC, comment #1:

I believe the attached test script reproduces the problem.

James Youngman <jay>
Project AdministratorIn charge of this item.
Fri 02 Jun 2006 04:52:48 PM UTC, original submission:

In xargs.c there is the following code:

/* Take the size of the environment into account. */
if (size_of_environment > posix_arg_size_max)
{
bc_ctl.arg_max = 0;
env_too_big = 1;
}
else
{
bc_ctl.arg_max = posix_arg_size_max - size_of_environment;
}

The equivalent code is missing from find. This means that if
the environment passed to find is too large, it can produce
exec() errors when "{} +" is used:

$ env | wc -c
1953
$ find . -exec true {} +
$ FOO=$(printf '%1024s' x) env | wc -c
2982
$ FOO=$(printf '%1024s' x) find . -exec true {} +
find: true: Argument list too long
find: true: Argument list too long

Geoff Clare <geoffclare>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #10412:  sv-bug-16738.sh added by jay (6KiB - application/x-shellscript - Updated updated script)

 

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 11 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 05 Aug 2006 07:24:41 PM UTCjayOpen/ClosedOpen=>Closed
  Fixed ReleaseNone=>4.2.28
Sat 05 Aug 2006 05:47:23 PM UTCjayStatusIn Progress=>Fixed
Mon 24 Jul 2006 10:34:03 PM UTCjayAttached File#10399=>Removed
Mon 24 Jul 2006 10:33:48 PM UTCjayAttached File-=>Added sv-bug-16738.sh, #10412
Sat 22 Jul 2006 12:03:03 PM UTCjayAttached File#10398=>Removed
Sat 22 Jul 2006 12:02:45 PM UTCjayAttached File-=>Added sv-bug-16738.sh, #10399
Sat 22 Jul 2006 11:45:46 AM UTCjaySeverity3 - Normal=>4 - Important
  StatusNone=>In Progress
  Assigned toNone=>jay
  Attached File-=>Added sv-bug-16738.sh, #10398

Back to the top


Powered by Savane 3.1-cleanup1