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

 
 

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

Submitter:  Michael Haubenwallner <haubi>
Submitted:  Fri 23 Mar 2007 03:01:12 PM UTC
   
 
Category:  xargs Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.3.2 Fixed Release:  4.3.5
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
Fri 23 Mar 2007 06:10:17 PM UTC, comment #1: 
James Youngman <jay>
Group administrator
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 Files:
   
   
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
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by haubi (Submitted the item)
  •  

    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.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-05-05 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.3.5
    2007-04-28 jay StatusNone Fixed
    2007-04-28 jay Attached File- Added aix-argv_max.patch, #12614
        Assigned toNone jay
        Carbon-Copy- Added -email is unavailable-
    2007-04-19 jay Summaryassertion 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.13-f8d8.
    Corresponding source code