【发布时间】:2014-10-30 16:11:18
【问题描述】:
在使用 -fsanitize=function 在 ubuntu 14.04 上使用 clang 3.5 编译 MAME/MESS (https://github.com/mamedev/mame/) 时,我收到很多以下错误:
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
我真的不明白这些错误是什么意思,因为如果函数签名不匹配,我希望应用程序在某个时候崩溃。到目前为止,没有人能向我解释这个错误的真正含义或为什么会这样。
【问题讨论】:
标签: clang llvm function-pointers