https://bugs.llvm.org/show_bug.cgi?id=45658
Bug ID: 45658
Summary: Linker error when using LTO with Fuzzer on Windos
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
When using libFuzzer on Windows using clang-cl and LTO (both full and thin) the
linking stage later fails with undefined reference to __sancov_lowest_stack.
Tested cpp file:
#include <iostream>
#include <cstring>
extern "C" int LLVMFuzzerTestOneInput(const std::uint8_t* data, std::size_t
size)
{
std::string s(size,' ');
std::memcpy(s.data(),data,size);
std::cout << s;
return 0;
}
CMD:
Input: clang-cl /MT -fsanitize=fuzzer -fuse-ld=lld -flto test.cpp -std:c++17
lld-link: error: undefined symbol: __sancov_lowest_stack
>>> referenced by test.cpp
>>> C:\Users\Markus\AppData\Local\Temp\test-bae0e8.obj
clang-cl: error: linker command failed
with exit code 1 (use -v to see invocation)
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs