]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.0.1917: undefined behaviour with python function pointer v9.0.1917
authorYee Cheng Chin <ychin.git@gmail.com>
Wed, 20 Sep 2023 17:59:47 +0000 (19:59 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 20 Sep 2023 17:59:47 +0000 (19:59 +0200)
commitd606fccf6fd716bda43a8e1d11d898f438d28b82
tree30de72950ac86aa810739d41dab22f8f3365208c
parentaa64ba1587d36de558f47519fa47c27e86c6e49a
patch 9.0.1917: undefined behaviour with python function pointer

Problem:  undefined behaviour with python function pointer
Solution: correctly cast function pointers from void

Fix more undefined behaviors in if_python

Fix remaining UBSAN errors from Clang 17 in if_python in casting
function pointers.

Also fix a mistake where `PyMem_Free()` should be returning void, by the
dynamic build is mistakenly casting it as a function that returns an
int.

closes: #13128

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
src/if_py_both.h
src/if_python.c
src/if_python3.c
src/version.c