aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-03-19 13:29:33 +0100
committerBjörn Gustavsson <[email protected]>2010-04-14 08:12:02 +0200
commitf43718785523cb4635d1c22a78a7620ed5e86609 (patch)
tree9cd1c9e428475c37b8037972c51b8d996bdd5b19 /lib/stdlib/test
parent1985e9d11c9cf409a935e648480bd275214adc3f (diff)
downloadotp-f43718785523cb4635d1c22a78a7620ed5e86609.tar.gz
otp-f43718785523cb4635d1c22a78a7620ed5e86609.tar.bz2
otp-f43718785523cb4635d1c22a78a7620ed5e86609.zip
re_SUITE: Add pcre_compile_workspace_overflow/1
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/re_SUITE.erl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/stdlib/test/re_SUITE.erl b/lib/stdlib/test/re_SUITE.erl
index 02683f9f1a..4e78568a87 100644
--- a/lib/stdlib/test/re_SUITE.erl
+++ b/lib/stdlib/test/re_SUITE.erl
@@ -18,12 +18,12 @@
%%
-module(re_SUITE).
--export([all/1, pcre/1,compile_options/1,run_options/1,combined_options/1,replace_autogen/1,global_capture/1,replace_input_types/1,replace_return/1,split_autogen/1,split_options/1,split_specials/1,error_handling/1,pcre_cve_2008_2371/1]).
+-export([all/1, pcre/1,compile_options/1,run_options/1,combined_options/1,replace_autogen/1,global_capture/1,replace_input_types/1,replace_return/1,split_autogen/1,split_options/1,split_specials/1,error_handling/1,pcre_cve_2008_2371/1,pcre_compile_workspace_overflow/1]).
-include("test_server.hrl").
-include_lib("kernel/include/file.hrl").
-all(suite) -> [pcre,compile_options,run_options,combined_options,replace_autogen,global_capture,replace_input_types,replace_return,split_autogen,split_options,split_specials,error_handling,pcre_cve_2008_2371].
+all(suite) -> [pcre,compile_options,run_options,combined_options,replace_autogen,global_capture,replace_input_types,replace_return,split_autogen,split_options,split_specials,error_handling,pcre_cve_2008_2371,pcre_compile_workspace_overflow].
pcre(doc) ->
["Run all applicable tests from the PCRE testsuites."];
@@ -544,3 +544,11 @@ pcre_cve_2008_2371(Config) when is_list(Config) ->
%% Make sure it doesn't crash the emulator.
re:compile(<<"(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]">>, [unicode]),
ok.
+
+pcre_compile_workspace_overflow(doc) ->
+ "Patch from http://vcs.pcre.org/viewvc/code/trunk/pcre_compile.c?r1=504&r2=505&view=patch";
+pcre_compile_workspace_overflow(Config) when is_list(Config) ->
+ N = 819,
+ ?line {error,{"internal error: overran compiling workspace",799}} =
+ re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]),
+ ok.