-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
build-problemllvm-toolsAll llvm tools that do not have corresponding tagAll llvm tools that do not have corresponding tag
Description
On the latest version (5d088ba), llvm-mc-assemble-fuzzer fails to build due to outdated API call to llvm::Target::createAsmStreamer, a raw pointer to MCInstPrinter is passed instead of a unique pointer. Wrapping into a unique ptr and building (from an empty corpus) results in an asan heap-buffer-overflow error.
Error:
lvm-project/llvm/tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp:203:66: error: no viable conversion from 'MCInstPrinter *' to 'std::unique_ptr<MCInstPrinter>'
203 | Str.reset(TheTarget->createAsmStreamer(Ctx, std::move(FOut), IP,
Reproduction:
cd llvm-project
mkdir build
cmake -S ./llvm \
-B ./build \
-DLLVM_USE_SANITIZER=Address \
-DLLVM_USE_SANITIZE_COVERAGE=On \
-DCMAKE_C_COMPILER=clang-18 \
-DCMAKE_CXX_COMPILER=clang++-18 \
-DCMAKE_BUILD_TYPE=Debug
cmake --build ./build --target llvm-mc-assemble-fuzzer -j
Metadata
Metadata
Assignees
Labels
build-problemllvm-toolsAll llvm tools that do not have corresponding tagAll llvm tools that do not have corresponding tag