summaryrefslogtreecommitdiffstats
path: root/llvm/test/MC
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-02-20 09:04:13 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-02-20 09:04:13 +0000
commit9712113f8ba65a634a02cf863737e2e48a594524 (patch)
tree2084cf6618c1708497c9d5ec80b2e67839c9de48 /llvm/test/MC
parent2cede2e229edfcf5815842d41dec66deb9e100f9 (diff)
downloadbcm5719-llvm-9712113f8ba65a634a02cf863737e2e48a594524.tar.gz
bcm5719-llvm-9712113f8ba65a634a02cf863737e2e48a594524.zip
[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
Diffstat (limited to 'llvm/test/MC')
-rw-r--r--llvm/test/MC/X86/cfi-scope-unclosed.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/MC/X86/cfi-scope-unclosed.s b/llvm/test/MC/X86/cfi-scope-unclosed.s
new file mode 100644
index 00000000000..0574a97b69b
--- /dev/null
+++ b/llvm/test/MC/X86/cfi-scope-unclosed.s
@@ -0,0 +1,10 @@
+# RUN: not llvm-mc %s -filetype=obj -triple=x86_64-unknown-linux \
+# RUN: -o /dev/null 2>&1 | FileCheck %s
+
+## Check we don't crash on unclosed frame scope.
+# CHECK: error: Unfinished frame!
+
+.text
+.globl foo
+foo:
+ .cfi_startproc
OpenPOWER on IntegriCloud