Akihiko Odaki <akihiko.od...@daynix.com> writes: > -fsanitize=undefined complains if function pointers are casted. It > also prevents enabling teh strict mode of CFI which is currently
Typo: the > disabled with -fsanitize-cfi-icall-generalize-pointers. The above describes the problem the patch solves. Good! Two suggestions: 1. Quote the error message. 2. Briefly describe the solution as well. Perhaps: The problematic casts are necessary to pass visit_type_T() and visit_type_T_members() as callbacks to qapi_clone() and qapi_clone_members(), respectively. Open-code these two functions to avoid the callbacks, and thus the type casts. > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2346 > Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com> Always kind of sad to move implementation code to headers, but getting rid of the function pointer casts makes sense, and I don't have better ideas for doing that. With an improved commit message Reviewed-by: Markus Armbruster <arm...@redhat.com>