From bb468eab3064d1e8bec5d6c6f53c60ccce2c9dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 24 May 2016 08:41:30 +0200 Subject: beam_receive: Don't crash when encountering nonsensical code --- lib/compiler/test/receive_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/compiler/test/receive_SUITE.erl') diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl index 3c397561fc..8304672558 100644 --- a/lib/compiler/test/receive_SUITE.erl +++ b/lib/compiler/test/receive_SUITE.erl @@ -118,8 +118,14 @@ coverage(Config) when is_list(Config) -> 59 = tuple_to_values(infinity, x), 61 = tuple_to_values(999999, x), 0 = tuple_to_values(1, x), + + {'EXIT',{{badmap,[]},_}} = (catch monitor_plus_badmap(self())), + ok. +monitor_plus_badmap(Pid) -> + monitor(process, Pid) + []#{}. + receive_all() -> receive Any -> -- cgit v1.2.3