aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2013-06-23 08:27:17 -0500
committerCharles Oliver Nutter <headius@headius.com>2013-06-23 09:06:42 -0500
commit75d1dab83f44efa5fa075bac8165458e6bfe628d (patch)
treeb57450c53f1430d57db1a116e886be0ec1c70603 /spec
parent2d656589d7312838cfa1cdb837e8d4ae4a0584ba (diff)
downloadbundler-75d1dab83f44efa5fa075bac8165458e6bfe628d.tar.gz
Add and use a new catch/throw mechanism that's stack-friendly.
This new mechanism, dubbed "safe catch", uses a fiber or thread every nth catch, to avoid blowing out the call stack. When used in the resolver, this effectively reduces the maximum stack depth needed to whatever depth 20 of the old recursions would have consumed. On JRuby, this allows installing at 256k stack a Gemfile that blew up at 512k. I would not expect any Gemfile to cause a stack error on JRuby with this patch in place, and the stack load on other implementations should be considerably reduced as well. This partially addresses #2449 and related issues, but I'd still like to see Bundler adopt an iterative algorithm, probably by building a state machine, since it will not require this patch's tricks and should never cause the excessively deep stacks of the recursive version.
Diffstat (limited to 'spec')
0 files changed, 0 insertions, 0 deletions