aboutsummaryrefslogtreecommitdiffstats
path: root/main/ruby/test_insns-lower-recursion-depth.patch
blob: 48e88dfd60c1ccee185f0ead2b1a161313c816f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
The patched test is a recursion function. We have lower stack size,
so we hit SystemStackError sooner than on other platforms.

  #361 test_insns.rb:389:in `block in <top (required)>':
     # recursive once
     def once n
       return %r/#{
         if n == 0
           true
         else
           once(n-1)             # here
         end
       }/ox
     end
     x = once(128); x = once(7); x = once(16);
     x =~ "true" && $~
    #=> "" (expected "true")  once
  Stderr output is not empty
     bootstraptest.tmp.rb:3:in `once': stack level too deep (SystemStackError)
             from bootstraptest.tmp.rb:7:in `block in once'
             from bootstraptest.tmp.rb:3:in `once'
             from bootstraptest.tmp.rb:7:in `block in once'
             from bootstraptest.tmp.rb:3:in `once'
             from bootstraptest.tmp.rb:7:in `block in once'
             from bootstraptest.tmp.rb:3:in `once'
             from bootstraptest.tmp.rb:7:in `block in once'
             from bootstraptest.tmp.rb:3:in `once'
              ... 125 levels...
             from bootstraptest.tmp.rb:3:in `once'
             from bootstraptest.tmp.rb:7:in `block in once'
             from bootstraptest.tmp.rb:3:in `once'
             from bootstraptest.tmp.rb:11:in `<main>'
  Test_insns.rb           FAIL 1/187
  FAIL 1/1197 tests failed
  Make: *** [uncommon.mk:666: yes-btest-ruby] Error 1

--- a/bootstraptest/test_insns.rb
+++ b/bootstraptest/test_insns.rb
@@ -248,7 +248,7 @@
         end
       }/ox
     end
-    x = once(128); x = once(7); x = once(16);
+    x = once(32); x = once(7); x = once(16);
     x =~ "true" && $~
   },
   [ 'once', <<~'},', ],         # {