-
Type: Task
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
C Drivers
-
Not Needed
-
According to python/cython issue 111178, Clang 17 introduced support for the -fsanitize=function check for the C language (previously only supported for C++). More context and discussions in openssl/openssl issue 22896.
Compiling the C Driver with Clang 17 or newer and UBSan enabled reveals several instances of undefined behavior due to invoking functions via a pointer with incorrect function type. These instances are both in library code and test code.
As most (all?) of these instances involve internal callback pointers/functions, these runtime errors can be easily addressed without affecting the API or ABI by using an intermediate internal function with the correct function type for the callback pointers that invokes the target function within their definition.