问题描述
一切顺利
./configure RANLIB=llvm-ranlib AR=llvm-ar
make
但是在我添加 CFLAGS="-fsanitize=address -g" 之后。
./configure RANLIB=llvm-ranlib AR=llvm-ar CFLAGS="-fsanitize=address -g"
make
触发错误
./common/libcommon.a(utils.o): In function `_our_safe_realloc':
/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src/common/utils.c:76: undefined reference to `rpl_realloc'
./common/libcommon.a(utils.o): In function `_our_safe_realloc':
/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src/common/utils.c:76: undefined reference to `rpl_realloc'
clang: fatal error: linker command failed with exit code 1 (use -v to see invocation)
clang: fatal error: linker command failed with exit code 1 (use -v to see invocation)
./common/libcommon.a(utils.o): In function `_our_safe_realloc':
/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src/common/utils.c:76: undefined reference to `rpl_realloc'
Makefile:690: recipe for target 'tcpreplay' failed
make[3]: *** [tcpreplay] Error 1
make[3]: *** Waiting for unfinished jobs....
Makefile:698: recipe for target 'tcprewrite' failed
make[3]: *** [tcprewrite] Error 1
clang: fatal error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:686: recipe for target 'tcpprep' failed
make[3]: *** [tcpprep] Error 1
./common/libcommon.a(utils.o): In function `_our_safe_realloc':
/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src/common/utils.c:76: undefined reference to `rpl_realloc'
clang: fatal error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:694: recipe for target 'tcpreplay-edit' failed
make[3]: *** [tcpreplay-edit] Error 1
make[3]: Leaving directory '/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src'
Makefile:1193: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src'
Makefile:573: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/yangke/Desktop/to-be-fuzzed/tcpreplay/tcpreplay/src'
Makefile:450: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
有人知道如何使用 AddressSanitizer 构建 tcpreplay 吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)