VirtualBox

Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#3300 closed defect (invalid)

Check return codes everywhere

Reported by: Markus Elfring Owned by:
Component: other Version: VirtualBox 2.1.2
Keywords: error detection, exception handling Cc:
Guest type: other Host type: other

Description

Some checks for return codes are missing.

Examples:
Would you like to add more error handling for return values from "strdup" like in the member function "Host::parseMountTable" and from "fprintf" in the function "xpidl_write_comment"?

Change History (11)

comment:1 by Klaus Espenlaub, 14 years ago

Since the report is about a very fuzzy topic, I've squeezed as much constructive criticism out of it as possible and added the reported strdup issue to the todo list.

I see very little value in fixing third-party code which is used to build VirtualBox. If that fails due to out of disk space situations this will not go unnoticed.

in reply to:  1 comment:2 by Markus Elfring, 14 years ago

Replying to klaus:

I suggest to avoid unchecked function calls.
Would you like to detect every error situation as early as possible?

comment:3 by Klaus Espenlaub, 14 years ago

Resolution: fixed
Status: newclosed

The strdup issue is fixed in SVN.

comment:4 by Markus Elfring, 14 years ago

Resolution: fixed
Status: closedreopened

Would you like to complete the error detection and corresponding exception handling also for function calls like "fprintf"?

comment:5 by Klaus Espenlaub, 14 years ago

Resolution: wontfix
Status: reopenedclosed

I already explained that I see no value in fixing this third-party code which is used to _build_ VirtualBox. If we'd fix code from the Mozilla project what would be left for them to do? :)

in reply to:  5 comment:6 by Markus Elfring, 14 years ago

Replying to klaus:

Would you like to forward this open issue to the other software project?

comment:7 by Markus Elfring, 14 years ago

Resolution: wontfix
Status: closedreopened

How do you think about to check if a function call like "fclose" failed?

comment:8 by Sander van Leeuwen, 14 years ago

Resolution: wontfix
Status: reopenedclosed

As you take great pleasure in notifying others about significant flaws in their code, I think it would be best if you took it upon yourself to inform 3rd parties.

comment:9 by Markus Elfring, 14 years ago

Resolution: wontfix
Status: closedreopened

Would you like to care for failed close() and malloc() calls in your own source files?

comment:10 by Klaus Espenlaub, 14 years ago

Resolution: invalid
Status: reopenedclosed

This is no bug report.

in reply to:  10 comment:11 by Markus Elfring, 14 years ago

Replying to klaus:

Why not?

I interpret it as a programming error to ignore return values from function calls that I pointed out.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use