VirtualBox

Ticket #3300 (closed defect: invalid)

Opened 5 years ago

Last modified 4 years ago

Check return codes everywhere

Reported by: elfring Owned by:
Priority: major 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

comment:1 follow-up: ↓ 2 Changed 4 years ago by klaus

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.

comment:2 in reply to: ↑ 1 Changed 4 years ago by elfring

Replying to klaus:

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

comment:3 Changed 4 years ago by klaus

  • Status changed from new to closed
  • Resolution set to fixed

The strdup issue is fixed in SVN.

comment:4 Changed 4 years ago by elfring

  • Status changed from closed to reopened
  • Resolution fixed deleted

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

comment:5 follow-up: ↓ 6 Changed 4 years ago by klaus

  • Status changed from reopened to closed
  • Resolution set to wontfix

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? :)

comment:6 in reply to: ↑ 5 Changed 4 years ago by elfring

Replying to klaus:

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

comment:7 Changed 4 years ago by elfring

  • Status changed from closed to reopened
  • Resolution wontfix deleted

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

comment:8 Changed 4 years ago by sandervl73

  • Status changed from reopened to closed
  • Resolution set to wontfix

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 Changed 4 years ago by elfring

  • Status changed from closed to reopened
  • Resolution wontfix deleted

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

comment:10 follow-up: ↓ 11 Changed 4 years ago by klaus

  • Status changed from reopened to closed
  • Resolution set to invalid

This is no bug report.

comment:11 in reply to: ↑ 10 Changed 4 years ago by elfring

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.

www.oracle.com
ContactPrivacy policyTerms of Use