當在Ubuntu 14.04與-fsanitize鏗鏘3.5編譯MAME/MESS(https://github.com/mamedev/mame/)=功能我得到很多下列錯誤:-fsanitize = function(UndefinedBehaviorSanitizer)錯誤實際上是什麼意思?
src/lib/util/delegate.h:651:64: runtime error: call to function osd_file_output_callback(_IO_FILE*, char const*, __va_list_tag*) through pointer to incorrect function type 'void (*)(delegate_generic_class *, const char *, __va_list_tag *)'
/home/notroot/trunk/src/osd/osdcore.c:14: note: osd_file_output_callback(_IO_FILE*, char const*, __va_list_tag*) defined here
src/lib/util/delegate.h:649:42: runtime error: call to function rom_exit(running_machine&) through pointer to incorrect function type 'void (*)(delegate_generic_class *)'
/home/notroot/trunk/src/emu/romload.c:1514: note: rom_exit(running_machine&) defined here
我真的不明白,因爲如果有什麼這些錯誤的意思函數簽名不匹配我會希望應用程序在某個時刻崩潰。到目前爲止,沒有人能夠向我解釋這個錯誤實際上意味着什麼或者爲什麼這是工作。
啊,所以這個警告是關於在函數簽名中強制執行「類型安全性」,只要它們的大小匹配,這是不必要的。我現在明白了 - 有道理。 – Quotenjugendlicher 2014-11-29 14:23:48