Open
Description
This issue was copied from checkedc/checkedc-clang#560
- The bsearch function is a polymorphic generic function in checked c whose return type is _Ptr where T is defined at callsites
- Currently we cannot provide bounds for the returned pointer. Ideally we would want the return pointer to be, _Array_ptr with bounds (base, (char *)base + (size * nmemb)).
This will make sure that the returned pointer is actually within the bounds of the input array on which the search is made.