April 2023
-
address various UBSan and [-Wunused-but-set-variable] warnings.
Show details
source/mimalloc/src/options.c:228:3: runtime error: call to function mi_log(char*, void*) through pointer to incorrect function type 'void (*)(const char *, void *)' source/build/src/osd.cpp:1755:44: runtime error: null pointer passed as argument 2, which is declared to never be null source/build/src/glbuild.cpp:296:9: runtime error: load of value 4294967295, which is not a valid value for type 'glsamplertype' source/duke3d/src/gamestructures.cpp:355:125: runtime error: member access within null pointer of type 'DukePlayer_t' ---- Note: we are also getting e.g. > source/build/include/compat.h:1008:72: runtime error: store to misaligned address 0x(...) > for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment due to '-fsanitize=alignment' implied by '-fsanitize=undefined'. This is left as-is.
-
pull out 'find_usermaphack()', also handling '!usermaphacks' case.
Show details
Exposed by UBSan, e.g.: source/build/src/engine.cpp:11090:67: runtime error: null pointer passed as argument 2, which is declared to never be null