Skip to content

Commit

Permalink
test: adjust xpath gc test to libxml2's max recursion depth
Browse files Browse the repository at this point in the history
See upstream libxml2 commit 6f1470a where the recursion limit is
hardcoded to 5000 stack frames.
  • Loading branch information
flavorjones committed May 14, 2021
1 parent 1c99019 commit 9fcb7d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/xml/test_xpath.rb
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def name_equals(nodeset, name, *args)
# long list of long arguments, to apply GC pressure during
# ruby_funcall argument marshalling
xpath = ["//tool[name_equals(.,'hammer'"]
1000.times { xpath << "'unused argument #{'x' * 1000}'" }
500.times { xpath << "'unused argument #{'x' * 1000}'" }
xpath << "'unused argument')]"
xpath = xpath.join(',')

Expand Down

0 comments on commit 9fcb7d2

Please sign in to comment.