libmirclient does not validate/verify parameters to API calls
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.
Changed in mir: | |
status: | New → Triaged |
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.