【问题标题】:undefined reference to `__ubsan_handle_out_of_bounds_abort'对“__ubsan_handle_out_of_bounds_abort”的未定义引用
【发布时间】:2022-01-22 19:19:09
【问题描述】:

在为 clang-4.0 编译带有编译器标志 -fsanitize=bounds 的代码时,我似乎遇到了这个链接错误,尽管代码没有越界访问。 编译器何时抛出此错误的任何帮助 - 对__ubsan_handle_out_of_bounds_abort 的未定义引用。

【问题讨论】:

    标签: linker clang llvm linker-errors


    【解决方案1】:

    您很可能忘记将-fsanitize=bounds 添加到链接器标志中。

    【讨论】:

    • 它已添加到链接器标志中,但仍然 :(
    • @gabbar 如果你在LDFLAGS 中使用-fsanitize=undefined 会怎样?
    猜你喜欢
    • 2011-03-27
    • 2016-04-04
    • 2015-11-03
    • 2011-08-11
    • 2019-07-22
    • 2015-07-20
    • 2019-06-22
    • 2012-04-02
    • 2021-02-04
    相关资源
    最近更新 更多