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

 
 

bug #35753: Completion of error handling

Submitted by:  Markus Elfring <elfring>
Submitted on:  Wed 07 Mar 2012 10:00:35 PM UTC  
 
Category: xargsSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Open/Closed: Closed
Release: 4.5.9Fixed Release: 4.5.13

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

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 AdministratorIn charge of this item.
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 AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 16 Jul 2014 07:49:58 AM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.5.13
    Sun 08 Dec 2013 09:07:16 PM UTCjayAttached 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.1-cleanup