Bug#1005341: libc++-13-dev: clang++ -stdlib=libc++ -fsanitize=fuzzer fails
0e4e63f6d6b at posteo.se
0e4e63f6d6b at posteo.se
Fri Feb 11 17:00:31 GMT 2022
Package: libc++-13-dev
Version: 1:13.0.1-2
Severity: normal
Steps to reproduce:
File /tmp/a.cpp:
#include <stdint.h>
#include <stddef.h>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t*, size_t) { return
0; }
Run clang++:
clang++-13 -stdlib=libc++ -fsanitize=fuzzer /tmp/a.cpp
Output:
/usr/bin/ld:
/usr/lib/llvm-13/lib/clang/13.0.1/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerIO.cpp.o):
in function `fuzzer::FileToVector(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned long,
bool)':
(.text._ZN6fuzzer12FileToVectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmb+0x30):
undefined reference to `std::basic_ifstream<char, std::char_traits<char>
>::basic_ifstream(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)'
/usr/bin/ld:
(.text._ZN6fuzzer12FileToVectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmb+0x64):
undefined reference to `std::istream::seekg(long, std::_Ios_Seekdir)'
...<snip>
Older versions work fine:
clang++-11 -stdlib=libc++ -fsanitize=fuzzer /tmp/a.cpp && echo $?
0
More information about the Pkg-llvm-team
mailing list