bugGNU Networking Utilities - Bugs: bug #35954, missing return code checks

 
 

bug #35954: missing return code checks

Submitted by:  Markus Elfring <elfring>
Submitted on:  Thu 22 Mar 2012 05:18:09 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Alfred M. Szmidt <ams>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Tue 27 Mar 2012 06:58:02 AM UTC, comment #8:

Closing, has been fixed in my tree will push when able.

When you have a test case for inetutils where things fail with printf, please open a new bug.

Alfred M. Szmidt <ams>
Project AdministratorIn charge of this item.
Mon 26 Mar 2012 09:00:53 PM UTC, comment #7:

How do you think about a test example from an other software project?

Markus Elfring <elfring>
Mon 26 Mar 2012 05:54:25 PM UTC, comment #6:

Please show a real world test case, with a shell script reproducing the issue.

Please move discussions regarding development methodologies to bug-inetutils@gnu.org, this is a bug tracker not a discussion list.

Alfred M. Szmidt <ams>
Project AdministratorIn charge of this item.
Mon 26 Mar 2012 05:38:13 PM UTC, comment #5:

How does your software behave if it would be connected to a full output device?

How do you think about to apply aspect-oriented software development?
http://coccinelle.lip6.fr/
http://research.msrg.utoronto.ca/ACC/Tutorial#A_Reusable_Aspect_for_Memory_All
http://aspectc.org/

Markus Elfring <elfring>
Mon 26 Mar 2012 05:19:37 PM UTC, comment #4:

If you can show a real world or plausible test case where things fail because of not checking the return value for printf, then we are all ears (but your system will be so horribly broken by that time that you won't be able to do anything anyway).

The cases with malloc are valid, and will be fixed to use xmalloc or similar.

Alfred M. Szmidt <ams>
Project AdministratorIn charge of this item.
Mon 26 Mar 2012 11:20:12 AM UTC, comment #3:

> We never check the return value of printf, nor will we.


I find this habit questionable. I would prefer a more complete error detection and corresponding exception handling.

How do you think about a topic like "How to raise warning if return value is disregarded - gcc or static code check?"?

Markus Elfring <elfring>
Mon 26 Mar 2012 03:32:05 AM UTC, comment #2:

Hi Markus!

The usage of malloc in whois is a real bug, but the usage of printf is on purpose.

We never check the return value of printf, nor will we.

Thank you for your report.

Alfred M. Szmidt <ams>
Project AdministratorIn charge of this item.
Thu 22 Mar 2012 05:21:59 PM UTC, comment #1:

Please correct the subject for this bug report.

Markus Elfring <elfring>
Thu 22 Mar 2012 05:18:09 PM UTC, original submission:

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

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:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ams (Posted a comment)
  • -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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 27 Mar 2012 06:58:11 AM UTCamsAssigned toNone=>ams
    Tue 27 Mar 2012 06:58:02 AM UTCamsStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 26 Mar 2012 05:54:25 PM UTCamsSeverity3 - Normal=>2 - Minor
    Mon 26 Mar 2012 03:32:05 AM UTCamsSummaryComplete build options for Pthread API=>missing return code checks

    Back to the top


    Powered by Savane 3.1-cleanup1