bugfindutils - Bugs: bug #19391, assertion failure on aix in...

 
 

bug #19391: assertion failure on aix in xargs.c line 447 (AIX)

Submitted by:  Michael Haubenwallner <haubi>
Submitted on:  Fri 23 Mar 2007 03:01:12 PM UTC  
 
Category: xargsSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.3.2Fixed Release: 4.3.5

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 02 May 2007 09:26:15 AM UTC, comment #4:

Verified (on aix5.3), patch (file #12614) works, thanks!

Michael Haubenwallner <haubi>
Sat 28 Apr 2007 02:28:44 PM UTC, comment #3:

I believe this to be fixed in the CVS code but have no access to AIX systems; please shout promptly if I am mistaken.

This problem is fixed in the CVS code for findutils.
To resolve your problem, you could either wait for the
next official release of findutils, or check out a copy
of the code from the CVS repository for findutils.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sat 28 Apr 2007 11:36:42 AM UTC, comment #2:

Please try the attached patch. I hope that it will fix your problem.

(file #12614)

James Youngman <jay>
Project AdministratorIn charge of this item.
Fri 23 Mar 2007 06:10:17 PM UTC, comment #1:

See also the first item at http://www.gnu.org/software/soc-projects/ideas.html#findutils

James Youngman <jay>
Project AdministratorIn charge of this item.
Fri 23 Mar 2007 03:01:12 PM UTC, original submission:

When running xargs on aix, this assertion in xargs.x#447 fails:

446 #if defined(ARG_MAX)
447 assert(bc_ctl.arg_max <= (ARG_MAX-2048));
448 #endif

As ARG_MAX can be modified (it is an aix kernel parameter), there is no meaning to have ARG_MAX defined as preprocessor constant.

In aix5.3 headers, there's a comment:

/* The following values will be undefined if the system supports a value that
is equal or greater than the stated minimum AND the supported value is
indeterminate (e.g. dependent on memory space).
On AIX, this includes ARG_MAX and CHILD_MAX. (But if _ALL_SOURCE is
used, these are defined with their default values).
*/

Note the last sentence in parents.

So there come a few ways around that to my mind:

1) in xargs.c: ignore ARG_MAX on aix
2) in config.h.in: put "#if 0 ... #endif" around _ALL_SOURCE
3) in configure.in: do not use 'AC_AIX', which defines _ALL_SOURCE

But for 2) and 3), one out of _XOPEN_SOURCE, _POSIX_SOURCE or _ANSI_C_SOURCE needs to be defined to prevent /usr/include/standars.h from defining _ALL_SOURCE.

So as the easiest (best?) way I'd suggest 1):

xargs/xargs.c:
-#if defined(ARG_MAX)
+#if defined(ARG_MAX) && !defined(_AIX)

Michael Haubenwallner <haubi>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #12614:  aix-argv_max.patch added by jay (1006B - text/patch - Proposed fix)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jay (Posted a comment)
  • -unavailable- added by haubi (Submitted the item)
  •  

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 05 May 2007 01:24:56 PM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.3.5
    Sat 28 Apr 2007 02:28:44 PM UTCjayStatusNone=>Fixed
    Sat 28 Apr 2007 11:36:42 AM UTCjayAttached File-=>Added aix-argv_max.patch, #12614
      Assigned toNone=>jay
      Carbon-Copy-=>Added -unavailable-
    Thu 19 Apr 2007 10:17:23 PM UTCjaySummaryassertion failure on aix in xargs.c line 447=>assertion failure on aix in xargs.c line 447 (AIX)

    Back to the top


    Powered by Savane 3.1-cleanup1