3 # (1) Tests of the match-limiting features. The results are different for
4 # interpretive or JIT matching, so this test should not be run with JIT. The
5 # same tests are run using JIT in test 17.
7 # (2) Other tests that must not be run with JIT.
10 Capturing subpattern count = 1
11 Starting code units: a z
13 Subject length lower bound = 2
14 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazzbbbbbb\=find_limits
15 Minimum heap limit = 0
16 Minimum match limit = 7
17 Minimum depth limit = 7
18 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz
19 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
20 aaaaaaaaaaaaaz\=find_limits
21 Minimum heap limit = 0
22 Minimum match limit = 20481
23 Minimum depth limit = 30
26 !((?:\s|//.*\\n|/[*](?:\\n|.)*?[*]/)*)!I
27 Capturing subpattern count = 1
28 May match empty string
29 Subject length lower bound = 0
30 /* this is a C style comment */\=find_limits
31 Minimum heap limit = 0
32 Minimum match limit = 64
33 Minimum depth limit = 7
34 0: /* this is a C style comment */
35 1: /* this is a C style comment */
39 Minimum heap limit = 0
40 Minimum match limit = 5
41 Minimum depth limit = 3
43 aaaaaaaaa\=find_limits
44 Minimum heap limit = 0
45 Minimum match limit = 12
46 Minimum depth limit = 3
51 Minimum heap limit = 0
52 Minimum match limit = 7
53 Minimum depth limit = 5
56 aaaaaaaaa\=find_limits
57 Minimum heap limit = 0
58 Minimum match limit = 21
59 Minimum depth limit = 5
64 abbbbbbbbbbbbbbbbbbbbba\=find_limits
65 Minimum heap limit = 0
66 Minimum match limit = 24
67 Minimum depth limit = 3
68 0: abbbbbbbbbbbbbbbbbbbbba
71 abbbbbbbbbbbbbbbbbbbbba\=find_limits
72 Minimum heap limit = 0
73 Minimum match limit = 66
74 Minimum depth limit = 45
75 0: abbbbbbbbbbbbbbbbbbbbba
77 /a(?:.(*THEN:ABC))*?a/ims
78 abbbbbbbbbbbbbbbbbbbbba\=find_limits
79 Minimum heap limit = 0
80 Minimum match limit = 66
81 Minimum depth limit = 45
82 0: abbbbbbbbbbbbbbbbbbbbba
84 /^(?>a+)(?>b+)(?>c+)(?>d+)(?>e+)/
85 aabbccddee\=find_limits
86 Minimum heap limit = 0
87 Minimum match limit = 7
88 Minimum depth limit = 7
91 /^(?>(a+))(?>(b+))(?>(c+))(?>(d+))(?>(e+))/
92 aabbccddee\=find_limits
93 Minimum heap limit = 0
94 Minimum match limit = 12
95 Minimum depth limit = 12
103 /^(?>(a+))(?>b+)(?>(c+))(?>d+)(?>(e+))/
104 aabbccddee\=find_limits
105 Minimum heap limit = 0
106 Minimum match limit = 10
107 Minimum depth limit = 10
113 /(*LIMIT_MATCH=12bc)abc/
114 Failed: error 160 at offset 17: (*VERB) not recognized or malformed
116 /(*LIMIT_MATCH=4294967290)abc/
117 Failed: error 160 at offset 24: (*VERB) not recognized or malformed
119 /(*LIMIT_DEPTH=4294967280)abc/I
120 Capturing subpattern count = 0
121 Depth limit = 4294967280
122 First code unit = 'a'
124 Subject length lower bound = 3
130 \= Expect limit exceeded
131 aaaaaaaaaaaaaz\=match_limit=3000
132 Failed: error -47: match limit exceeded
135 \= Expect limit exceeded
136 aaaaaaaaaaaaaz\=depth_limit=10
137 Failed: error -53: matching depth limit exceeded
139 /(*LIMIT_MATCH=3000)(a+)*zz/I
140 Capturing subpattern count = 1
142 Starting code units: a z
144 Subject length lower bound = 2
145 \= Expect limit exceeded
147 Failed: error -47: match limit exceeded
148 \= Expect limit exceeded
149 aaaaaaaaaaaaaz\=match_limit=60000
150 Failed: error -47: match limit exceeded
152 /(*LIMIT_MATCH=60000)(*LIMIT_MATCH=3000)(a+)*zz/I
153 Capturing subpattern count = 1
155 Starting code units: a z
157 Subject length lower bound = 2
158 \= Expect limit exceeded
160 Failed: error -47: match limit exceeded
162 /(*LIMIT_MATCH=60000)(a+)*zz/I
163 Capturing subpattern count = 1
165 Starting code units: a z
167 Subject length lower bound = 2
171 \= Expect limit exceeded
172 aaaaaaaaaaaaaz\=match_limit=3000
173 Failed: error -47: match limit exceeded
175 /(*LIMIT_DEPTH=10)(a+)*zz/I
176 Capturing subpattern count = 1
178 Starting code units: a z
180 Subject length lower bound = 2
181 \= Expect limit exceeded
183 Failed: error -53: matching depth limit exceeded
184 \= Expect limit exceeded
185 aaaaaaaaaaaaaz\=depth_limit=1000
186 Failed: error -53: matching depth limit exceeded
188 /(*LIMIT_DEPTH=10)(*LIMIT_DEPTH=1000)(a+)*zz/I
189 Capturing subpattern count = 1
191 Starting code units: a z
193 Subject length lower bound = 2
198 /(*LIMIT_DEPTH=1000)(a+)*zz/I
199 Capturing subpattern count = 1
201 Starting code units: a z
203 Subject length lower bound = 2
207 \= Expect limit exceeded
208 aaaaaaaaaaaaaz\=depth_limit=10
209 Failed: error -53: matching depth limit exceeded
211 # These three have infinitely nested recursions.
215 Failed: error -52: nested recursion at the same subject position
217 /((?(R2)a+|(?1)b))()/
219 Failed: error -52: nested recursion at the same subject position
221 /(?(R)a*(?1)|((?R))b)/
223 Failed: error -52: nested recursion at the same subject position
225 # The allusedtext modifier does not work with JIT, which does not maintain
226 # the leftchar/rightchar data.
228 /abc(?=xyz)/allusedtext
237 /(?<=pqr)abc(?=xyz)/allusedtext
241 xyzpqrabcxyzpqr\=aftertext
258 /abc(?=xyz(*ACCEPT))/
263 /abc(?=abcde)(?=ab)/allusedtext
268 # These tests provoke recursion loops, which give a different error message
272 Capturing subpattern count = 0
273 May match empty string
274 Subject length lower bound = 0
276 Failed: error -52: nested recursion at the same subject position
279 Capturing subpattern count = 1
280 May match empty string
281 Subject length lower bound = 0
286 Failed: error -52: nested recursion at the same subject position
288 /(ab|(bc|(de|(?R))))/I
289 Capturing subpattern count = 3
290 May match empty string
291 Subject length lower bound = 0
296 Failed: error -52: nested recursion at the same subject position
298 /(ab|(bc|(de|(?1))))/I
299 Capturing subpattern count = 3
300 May match empty string
301 Subject length lower bound = 0
306 Failed: error -52: nested recursion at the same subject position
308 /x(ab|(bc|(de|(?1)x)x)x)/I
309 Capturing subpattern count = 3
310 First code unit = 'x'
311 Subject length lower bound = 3
316 Failed: error -52: nested recursion at the same subject position
320 Failed: error -52: nested recursion at the same subject position
322 Failed: error -52: nested recursion at the same subject position
326 Failed: error -52: nested recursion at the same subject position
328 Failed: error -52: nested recursion at the same subject position
332 Failed: error -52: nested recursion at the same subject position
336 Failed: error -52: nested recursion at the same subject position
343 Failed: error -52: nested recursion at the same subject position
346 ------------------------------------------------------------------
354 ------------------------------------------------------------------
355 Capturing subpattern count = 1
356 Subject length lower bound = 1
358 Failed: error -52: nested recursion at the same subject position
360 # These tests don't behave the same with JIT
362 /\w+(?C1)/BI,no_auto_possess
363 ------------------------------------------------------------------
369 ------------------------------------------------------------------
370 Capturing subpattern count = 0
371 Options: no_auto_possess
372 Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
373 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
374 Subject length lower bound = 1
385 /(*NO_AUTO_POSSESS)\w+(?C1)/BI
386 ------------------------------------------------------------------
392 ------------------------------------------------------------------
393 Capturing subpattern count = 0
394 Compile options: <none>
395 Overall options: no_auto_possess
396 Starting code units: 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P
397 Q R S T U V W X Y Z _ a b c d e f g h i j k l m n o p q r s t u v w x y z
398 Subject length lower bound = 1
409 # This test breaks the JIT stack limit
416 /(*LIMIT_HEAP=21)\[(a)]{60}/expand
418 Failed: error -63: heap limit exceeded