Bugs item #1671695, was opened at 2007-03-01 13:06
Message generated for change (Comment added) made by subrata_modak
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=103382&aid=1671695&group_id=3382

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tools
Group: Miscellaneous
>Status: Closed
>Resolution: Later
Priority: 5
Private: No
Submitted By: Markus Elfring (elfring)
Assigned to: mreed (mreed10)
Summary: Check return codes everywhere

Initial Comment:
Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "write" like 
in the function "wlog_record_write" and from "lseek" in the function 
"wlog_scan_backward"?
http://ltp.cvs.sourceforge.net/ltp/ltp/lib/write_log.c?revision=1.7&view=markup

----------------------------------------------------------------------

>Comment By: Subrata (subrata_modak)
Date: 2007-05-21 05:12

Message:
Logged In: YES 
user_id=1737361
Originator: NO

LTP will undergo a major overhaul in the coming days. We will look in to
this aspect too for all the testcases. Meanwhile, we are not looking into
error handling for any particular testcase alone. This will be dealt veru
soon in future on the overall testcases. As mentioned in my previous
comment, i would encourage you to submit a patch in this regard.
Regards--
Subrata

----------------------------------------------------------------------

Comment By: Markus Elfring (elfring)
Date: 2007-04-27 12:54

Message:
Logged In: YES 
user_id=572001
Originator: YES

1. I've got doubts about the correctness of the following source code.
http://ltp.cvs.sourceforge.net/ltp/ltp/lib/write_log.c?revision=1.9&view=markup
...
offset = lseek(wfile->w_afd, 0, SEEK_CUR) - reclen;
if ( offset == -1 ) {
...

Should the additional subtraction only be applied in the successful case?

4. Would you like to reduce the efforts for error code checking by an
exception class hierarchy?
http://dietmar-kuehl.de/mirror/c++-faq/exceptions.html#faq-17.1
http://cexcept.sourceforge.net/

----------------------------------------------------------------------

Comment By: Subrata (subrata_modak)
Date: 2007-04-27 10:14

Message:
Logged In: YES 
user_id=1737361
Originator: NO

The same has been fixed. May be you can also submit a patch for all error
handling required after analysis from your tool from http://splint.org/.
Thanks--
Subrata

----------------------------------------------------------------------

Comment By: Markus Elfring (elfring)
Date: 2007-03-28 08:23

Message:
Logged In: YES 
user_id=572001
Originator: YES

Thanks for this fix.

1. Would you like to detect every error situation as early as possible?

2. I see more candidates for similar updates to avoid unchecked function
calls.
Example:
http://ltp.cvs.sourceforge.net/ltp/ltp/lib/tst_tmpdir.c?revision=1.11&view=markup
- close()
- printf()
- scanf()
- strdup()
- unlink()

3. Would you like to improve the source code with the help of the tool
"http://splint.org/";?

----------------------------------------------------------------------

Comment By: Subrata (subrata_modak)
Date: 2007-03-28 04:05

Message:
Logged In: YES 
user_id=1737361
Originator: NO

Added more error handling code.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=103382&aid=1671695&group_id=3382

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to