Menu

#5 Check return codes everywhere

open
nobody
General (5)
5
2007-05-03
2006-09-10
No

Some checks for return codes are missing.

Example:
http://svn.sourceforge.net/viewvc/opensnmp/trunk/opensnmp/base/snmpMutexObj.C?revision=381&view=markup

Please add more error handling for functions like
"..._init" and "..._destroy".
http://www.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html

Would the call "std::terminate()" be appropriate here?

Discussion

  • Markus Elfring

    Markus Elfring - 2007-04-24
    • assigned_to: nobody --> hardaker
     
  • Markus Elfring

    Markus Elfring - 2007-04-24

    Logged In: YES
    user_id=572001
    Originator: YES

    Are you going to fix your source files?

    How do you think about to reuse an other well-known class library for this purpose?

     
  • Wes Hardaker

    Wes Hardaker - 2007-04-24
    • assigned_to: hardaker --> nobody
    • status: open --> pending
     
  • Wes Hardaker

    Wes Hardaker - 2007-04-24

    Logged In: YES
    user_id=76242
    Originator: NO

    Please submit a patch for review. Thanks!

     
  • Markus Elfring

    Markus Elfring - 2007-04-24
    • status: pending --> open
     
  • Markus Elfring

    Markus Elfring - 2007-04-24

    Logged In: YES
    user_id=572001
    Originator: YES

    Patches will depend on consensus for the correct error handling approach.

     
  • Wes Hardaker

    Wes Hardaker - 2007-04-25
    • status: open --> pending
     
  • Wes Hardaker

    Wes Hardaker - 2007-04-25

    Logged In: YES
    user_id=76242
    Originator: NO

    Your bug report merely points to the entire source tree and says "you have errors everywhere, please fix them". It is not sufficient for us to determine where the problems exist. Your example points to an entire file. If you have particicular concerns, point them out more clearly please with a specific problem. If there are multiple alternative solutions you would like us to consider, then feel free to spell them out as part of the example.

    As far as using another library, it is unlikely we would adopt the use of another library as a base requirement unless it was drastically needed. The library now does not require many other base libraries by design to reduce the overhead required by people making use of the opensnmp package. Though we would consider using any other library that provided us great benifit, the costs of doing so must be weighed carefully.

     
  • Markus Elfring

    Markus Elfring - 2007-04-25

    Logged In: YES
    user_id=572001
    Originator: YES

    I have pointed out a few open issues in the source file "snmpMutexObj.C".

     
  • Markus Elfring

    Markus Elfring - 2007-04-25
    • status: pending --> open
     
  • Wes Hardaker

    Wes Hardaker - 2007-05-03
    • status: open --> pending
     
  • Wes Hardaker

    Wes Hardaker - 2007-05-03

    Logged In: YES
    user_id=76242
    Originator: NO

    you pointed to an entire file and said it has problems. If you wish to submit specific bugs, please do so. But bugs that are generic and state "some checks for return codes are missing" does not help us find specific problem areas. You need to identify which return codes aren't being checked within the source code. Doing anything else will simply result in a bug which will likely not be fixed because there is no condition for when it is acceptable to close it and mark it as "fixed".

     
  • Markus Elfring

    Markus Elfring - 2007-05-03

    Logged In: YES
    user_id=572001
    Originator: YES

    Would you like to grep for the indicated function names?

     
  • Markus Elfring

    Markus Elfring - 2007-05-03
    • status: pending --> open
     
MongoDB Logo MongoDB