summaryrefslogtreecommitdiff
path: root/lib/compiler/test/beam_validator_SUITE_data
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2013-08-01 02:03:39 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2013-08-01 02:04:25 +0200
commiteaeea8dbde10e5e0a1c65bfd093ae18398b400d0 (patch)
tree6abf72d7adb389845c03a27ba66a6ce44feb08ae /lib/compiler/test/beam_validator_SUITE_data
parenta938fc96881564f5f56a510b0c750efaa9ed48e4 (diff)
downloaderlang-eaeea8dbde10e5e0a1c65bfd093ae18398b400d0.tar.gz
Forbid returning a match context in beam_validator
If a match context is returned from a function without being converted back to a plain old binary, the whole VM will crash.
Diffstat (limited to 'lib/compiler/test/beam_validator_SUITE_data')
-rw-r--r--lib/compiler/test/beam_validator_SUITE_data/bad_bin_match.S15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/compiler/test/beam_validator_SUITE_data/bad_bin_match.S b/lib/compiler/test/beam_validator_SUITE_data/bad_bin_match.S
new file mode 100644
index 0000000000..a60ca1e89a
--- /dev/null
+++ b/lib/compiler/test/beam_validator_SUITE_data/bad_bin_match.S
@@ -0,0 +1,15 @@
+{module, bad_bin_match}. %% version = 0
+
+{exports, [{t,1}]}.
+
+{attributes, []}.
+
+{labels, 3}.
+
+
+{function, t, 1, 2}.
+ {label,1}.
+ {func_info,{atom,t},{atom,t},1}.
+ {label,2}.
+ {test,bs_start_match2,{f,1},1,[{x,0},0],{x,0}}.
+ return.