Mir

libmirclient does not validate/verify parameters to API calls

Bug #1239978 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Expired
High
Unassigned

Bug Description

libmirclient does not validate/verify parameters to API calls.

At present, a failed connection will return a *valid* handle that is flagged internally as an error. And then it's up to later function calls to handle "error" handles gracefully; sometimes still doing callbacks and sometimes just ignoring them and returning immediately. But this behaviour is not consistent and probably not a good idea anywhere.

Recent bugs in Ubuntu Touch have shown us we need libmirclient to properly verify parameters to API calls. Because there are broken toolkits and broken clients out there and we waste time debugging if it's not obvious who's at fault.

I suggest all mir_ functions should validate their parameters and return an error, or in some cases should crash/throw immediately. That will make it more clear to the client/toolkit author where they're going wrong. Either way, mir_ client functions should not continue executing in a semi-functional way when given bad parameters as they do now.

Tags: clientapi
Changed in mir:
status: New → Triaged
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

AFAIK we now often do this with client functions. Need to find out what's missing or just log new bugs for any specific things that need fixing.

Changed in mir:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Mir because there has been no activity for 60 days.]

Changed in mir:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.