[llvm-bugs] [Bug 45658] New: Linker error when using LTO with Fuzzer on Windos
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 24 01:35:28 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: markus.boeck02 at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200424/659719b6/attachment-0001.html>
More information about the llvm-bugs
mailing list