summaryrefslogtreecommitdiff
path: root/erts/emulator/test/exception_SUITE.erl
diff options
context:
space:
mode:
authorJohn Högberg <john@erlang.org>2021-10-15 12:24:06 +0200
committerJohn Högberg <john@erlang.org>2021-10-15 12:24:06 +0200
commit41ab7b4a428d80282ae28dd241795e8666a4d747 (patch)
tree16c406260453774bae14f59cf3b01dc91acd6583 /erts/emulator/test/exception_SUITE.erl
parentd984bdfa52b9a35812cb6bcc9ff4c6d5e5a32e3c (diff)
parent369ef5ce0769dd42c3b21ffabc823b0a8f1c24f7 (diff)
downloaderlang-41ab7b4a428d80282ae28dd241795e8666a4d747.tar.gz
Merge branch 'maint'
* maint: erts: Fix crash on exceptions with huge line numbers
Diffstat (limited to 'erts/emulator/test/exception_SUITE.erl')
-rw-r--r--erts/emulator/test/exception_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/erts/emulator/test/exception_SUITE.erl b/erts/emulator/test/exception_SUITE.erl
index 6744ee895b..7281b2c9e9 100644
--- a/erts/emulator/test/exception_SUITE.erl
+++ b/erts/emulator/test/exception_SUITE.erl
@@ -1576,6 +1576,13 @@ line_numbers(Config) when is_list(Config) ->
{?MODULE,test_tl,1,[{file,"list_bifs.erl"},{line,102}]}|_]}} =
(catch test_tl(y)),
+ %% This line number is too large to be represented and will be silently
+ %% ignored by the emulator.
+ {'EXIT',{crash,
+ [{?MODULE,crash_huge_line,1,[]},
+ {?MODULE,line_numbers,1,_}|_]}} =
+ (catch crash_huge_line(gurka)),
+
ok.
id(I) -> I.
@@ -1698,3 +1705,8 @@ update_map(M0) -> %Line 2
test_hd(X) -> foo(), hd(X). %Line 101
test_tl(X) -> foo(), tl(X). %Line 102
foo() -> id(100).
+
+-file("huge_lines.erl", 1600000000). %Line 1600000000
+
+crash_huge_line(_) -> %Line 1600000002
+ erlang:error(crash). %Line 1600000003