[MC] - Don't crash on unclosed frame.
authorGeorge Rimar <grimar@accesssoftek.com>
Tue, 20 Feb 2018 09:04:13 +0000 (09:04 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Tue, 20 Feb 2018 09:04:13 +0000 (09:04 +0000)
commit9712113f8ba65a634a02cf863737e2e48a594524
tree2084cf6618c1708497c9d5ec80b2e67839c9de48
parent2cede2e229edfcf5815842d41dec66deb9e100f9
[MC] - Don't crash on unclosed frame.

llvm-mc can crash when
there is cfi_startproc without cfi_end_proc:

.text
.globl foo
foo:
 .cfi_startproc

Testcase shows the issue, patch fixes it.

Differential revision: https://reviews.llvm.org/D43456

llvm-svn: 325564
llvm/lib/MC/MCStreamer.cpp
llvm/test/MC/X86/cfi-scope-unclosed.s [new file with mode: 0644]