CTSRD-CHERI/llvm

Using .cfi_restore $c17 crashes compiler

arichardson opened this issue · 1 comments

.cfi_restore $c17 crashes but .cfi_restore $a0 works.

Assertion failed: ((isUIntN(8 * Size, Value) || isIntN(8 * Size, Value)) && "Invalid size"), function EmitIntValue, file /exports/users/alr48/sources/llvm/lib/MC/MCStreamer.cpp, line 126.
#0 0x0000000003249708 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/alr48/cheri/output/sdk/bin/clang-7+0x3249708)
#1 0x0000000003249b06 __assert (/home/alr48/cheri/output/sdk/bin/clang-7+0x3249b06)
#2 0x0000000002f0cfa4 (/home/alr48/cheri/output/sdk/bin/clang-7+0x2f0cfa4)
#3 0x00000000020eb70e llvm::MipsELFStreamer::EmitIntValue(unsigned long, unsigned int) (/home/alr48/cheri/output/sdk/bin/clang-7+0x20eb70e)
#4 0x0000000002ef2b31 (anonymous namespace)::FrameEmitterImpl::EmitCFIInstructions(llvm::ArrayRef<llvm::MCCFIInstruction>, llvm::MCSymbol*) (/home/alr48/cheri/output/sdk/bin/clang-7+0x2ef2b31)
#5 0x0000000002ef1dba llvm::MCDwarfFrameEmitter::Emit(llvm::MCObjectStreamer&, llvm::MCAsmBackend*, bool) (/home/alr48/cheri/output/sdk/bin/clang-7+0x2ef1dba)
#6 0x0000000002f0398c llvm::MCObjectStreamer::EmitFrames(llvm::MCAsmBackend*) (/home/alr48/cheri/output/sdk/bin/clang-7+0x2f0398c)
#7 0x0000000002ef5c1a llvm::MCELFStreamer::FinishImpl() (/home/alr48/cheri/output/sdk/bin/clang-7+0x2ef5c1a)
#8 0x0000000002f11553 llvm::MCStreamer::Finish() (/home/alr48/cheri/output/sdk/bin/clang-7+0x2f11553)
#9 0x0000000002f39e03 (anonymous namespace)::AsmParser::Run(bool, bool) (/home/alr48/cheri/output/sdk/bin/clang-7+0x2f39e03)
#10 0x00000000018b7ea7 cc1as_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/alr48/cheri/output/sdk/bin/clang-7+0x18b7ea7)
#11 0x00000000018b1008 main (/home/alr48/cheri/output/sdk/bin/clang-7+0x18b1008)
#12 0x00000000018ae095 _start (/home/alr48/cheri/output/sdk/bin/clang-7+0x18ae095)

Fixed in cb5729e