Fix a bug in stack reallocation during deep recursion.
This commit is contained in:
1 parent
8dca3ef10d
commit
5968f54f55
3 files changed
+20
-12
No files matched your search
@@ -311,6 +311,11 @@ def fac: if . == 1 then 1 else . * (. - 1 | fac) end; [.[] | fac]
|
||||
[1,2,3,4]
|
||||
[1,2,6,24]
|
||||
|
||||
# test stack overflow and reallocation
|
||||
# this test is disabled for now, it takes a realllllly long time.
|
||||
# def f: if length > 1000 then . else .+[1]|f end; f | length
|
||||
# []
|
||||
# 1001
|
||||
|
||||
#
|
||||
# Assignment
|
||||
|
||||
Reference in new issue
Block a user