If rlimits results in a "stack overflow" or other error, then you'll have a much easier time. I'm assuming of course, probably erroneously, that rlimits isn't stopping the segfault.