[llvm-bugs] [Bug 44778] New: Interpreter crashes due to an "Unknown constant pointer type!"
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 4 11:43:52 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=44778
Bug ID: 44778
Summary: Interpreter crashes due to an "Unknown constant
pointer type!"
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: barbaro.alberto at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Created attachment 23087
--> https://bugs.llvm.org/attachment.cgi?id=23087&action=edit
pngpixel_crash.bc + mini.png
Hi all,
I have noticed that the interpreter is not able to deal with a pointer to a
struct in a store instruction. In the present case the following instruction
caused the crash:
About to interpret: store <2 x %struct.code*> <%struct.code* getelementptr
inbounds ([512 x %struct.code], [512 x %struct.code]* @fixedtables.lenfix.681,
i64 0, i64 0), %struct.code* getelementptr inbounds ([32 x %struct.code], [32 x
%struct.code]* @fixedtables.distfix.682, i64 0, i64 0)>, <2 x %struct.code*>*
%96, align 8, !tbaa !50
The entire crash dump is:
Unknown constant pointer type!
UNREACHABLE executed at
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/ExecutionEngine.cpp:1008!
Stack dump:
0. Program arguments: /usr/local/bin/lli --force-interpreter pngpixel_crash.bc
0 0 mini.png
#0 0x0000564bad642af9 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/al/llvm-9.0.0.src/lib/Support/Unix/Signals.inc:533:0
#1 0x0000564bad642b8c PrintStackTraceSignalHandler(void*)
/home/al/llvm-9.0.0.src/lib/Support/Unix/Signals.inc:594:0
#2 0x0000564bad640a66 llvm::sys::RunSignalHandlers()
/home/al/llvm-9.0.0.src/lib/Support/Signals.cpp:68:0
#3 0x0000564bad6424b0 SignalHandler(int)
/home/al/llvm-9.0.0.src/lib/Support/Unix/Signals.inc:385:0
#4 0x00007f697df61890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#5 0x00007f697ca0ae97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007f697ca0c801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#7 0x0000564bad5ce768 bindingsErrorHandler(void*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, bool) /home/al/llvm-9.0.0.src/lib/Support/ErrorHandling.cpp:218:0
#8 0x0000564bacfc2e5a llvm::ExecutionEngine::getConstantValue(llvm::Constant
const*) /home/al/llvm-9.0.0.src/lib/ExecutionEngine/ExecutionEngine.cpp:1013:0
#9 0x0000564bacfeb873 llvm::Interpreter::getOperandValue(llvm::Value*,
llvm::ExecutionContext&)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:2108:0
#10 0x0000564bacfe548a llvm::Interpreter::visitStoreInst(llvm::StoreInst&)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:1105:0
#11 0x0000564bacfee32f llvm::InstVisitor<llvm::Interpreter,
void>::visitStore(llvm::StoreInst&)
/home/al/llvm-9.0.0.src/include/llvm/IR/Instruction.def:173:0
#12 0x0000564bacfed18d llvm::InstVisitor<llvm::Interpreter,
void>::visit(llvm::Instruction&)
/home/al/llvm-9.0.0.src/include/llvm/IR/Instruction.def:173:0
#13 0x0000564bacfebd7b llvm::Interpreter::run()
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Execution.cpp:2161:0
#14 0x0000564bacfd6bdc llvm::Interpreter::runFunction(llvm::Function*,
llvm::ArrayRef<llvm::GenericValue>)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/Interpreter/Interpreter.cpp:101:0
#15 0x0000564bacfbfb94
llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
std::vector<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > > > const&, char const* const*)
/home/al/llvm-9.0.0.src/lib/ExecutionEngine/ExecutionEngine.cpp:470:0
#16 0x0000564bac794cc4 main /home/al/llvm-9.0.0.src/tools/lli/lli.cpp:614:0
#17 0x00007f697c9edb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x0000564bac791a9a _start (/usr/local/bin/lli+0x110aa9a)
[1] 12828 abort (core dumped) /usr/local/bin/lli --force-interpreter
pngpixel_crash.bc 0 0 mini.png
You should be able to reproduce the bug using the following command:
/usr/local/bin/lli --force-interpreter pngpixel_crash.bc 0 0 mini.png
--
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/20200204/5d1bbfd9/attachment.html>
More information about the llvm-bugs
mailing list