Bug #89
closeduu_list_find() leaves error unset when successfully returning NULL
90%
Description
bustos 2004-12-13
See comments.
xxxxx@xxxxx.com 2004-12-14 00:25:00 GMT
[dp: bug is marked bite-size but description was opaque. relocated comments]
bustos 2004-12-13
If uu_list_find() is called on a list which doesn't have a comparison
function, then it sets the uu_error() to UU_ERROR_NOT_SUPPORTED and
returns NULL. NULL is also the return value for when uu_list_find()
completes successfully, but didn't find anything. If the uu_error()
happened to be UU_ERROR_NOT_SUPPORTED before uu_list_find() was
called, then there's no way for the caller to know whether the function
completed successfully.
xxxxx@xxxxx.com 2004-12-14 00:25:00 GMT
Files
Updated by Gary Mills almost 12 years ago
This appears easy to fix, but finding a way to reproduce the
problem and to test the fix seems very difficult. In almost all
cases, the caller of uu_list_find() tests for a NULL return value
but does not proceed to test the uu_error() value. Nothing would
change if uu_list_find() set the error value correctly. Is there any
point at guessing at a fix?
Updated by Jason King over 11 years ago
- Category set to lib - userland libraries
- Status changed from New to In Progress
- Assignee set to Jason King
Webrev available at: http://cr.illumos.org/view/83aaaxjr/
There probably isn't a good way to force a test, but I think inspection + nightly should be sufficient.
Updated by Jason King over 11 years ago
Managed to create a test case
Updated by Jason King over 11 years ago
- Status changed from In Progress to Resolved
Resolved with commit:1826d6245009