bugfindutils - Bugs: bug #35753, Completion of error handling


bug #35753: Completion of error handling

Submitter:  Markus Elfring <elfring>
Submitted:  Wed 07 Mar 2012 10:00:35 PM UTC
Category:  xargs Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.5.9 Fixed Release:  4.5.13
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


Tue 10 Dec 2013 05:39:51 PM UTC, comment #3: 

Patch 4 is pointless.  We use atexit(close_stdin) for a reason: all reads from stdin and all writes to stdout/stderr will cause the ferror() flag for the standard descriptor to be set if there is a failure, and close_stdin will then guarantee non-zero exit status in that case.  The point of the atexit installation is to avoid the churn of having to check every single fprintf or other operation on stdout, and instead let the atexit hook take care of it for us.

Eric Blake <ericb>
Project Administrator
Sun 08 Dec 2013 09:07:57 PM UTC, comment #2: 

I've also pushed these patches (with minor changes) to the public git repository.

James Youngman <jay>
Project Administrator
Sun 08 Dec 2013 09:07:16 PM UTC, comment #1: 

The attached patches should resolve the material problems with atexit and fprintf.

There are remaining calls to fprintf which are not checked, but these are for debug information or error message generation.   In the latter case there is no point diagnosing a failure to write to stderr by writing to stderr, and the return value is already nonzero.

The patches are attached.

(file #29807, file #29808, file #29809, file #29810)

James Youngman <jay>
Project Administrator
Wed 07 Mar 2012 10:00:35 PM UTC, original submission:  

I have noticed that a few checks for return codes are missing in  source files for your current software.

Would you like to add more error handling for return values from functions like the following?

Markus Elfring <elfring>


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

Attach Files:


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by elfring (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-16 jay Open/ClosedOpen Closed
        Fixed ReleaseNone 4.5.13
    2013-12-08 jay Attached File- Added 0001-Bug-35753-detect-failure-of-the-atexit-library-funct.patch, #29807
        Attached File- Added 0002-Fix-format-specifier-in-safe_read-error-message.patch, #29808
        Attached File- Added 0003-Fix-some-signed-unsigned-problems.patch, #29809
        Attached File- Added 0004-Check-the-success-failure-of-material-I-O-operations.patch, #29810
        CategoryNone xargs
        StatusNone Fixed
        Assigned toNone jay

    Back to the top

    Powered by Savane 3.9