【发布时间】:2022-01-22 19:19:09
【问题描述】:
在为 clang-4.0 编译带有编译器标志 -fsanitize=bounds 的代码时,我似乎遇到了这个链接错误,尽管代码没有越界访问。
编译器何时抛出此错误的任何帮助 - 对__ubsan_handle_out_of_bounds_abort 的未定义引用。
【问题讨论】:
标签: linker clang llvm linker-errors
在为 clang-4.0 编译带有编译器标志 -fsanitize=bounds 的代码时,我似乎遇到了这个链接错误,尽管代码没有越界访问。
编译器何时抛出此错误的任何帮助 - 对__ubsan_handle_out_of_bounds_abort 的未定义引用。
【问题讨论】:
标签: linker clang llvm linker-errors
您很可能忘记将-fsanitize=bounds 添加到链接器标志中。
【讨论】:
LDFLAGS 中使用-fsanitize=undefined 会怎样?