How to be young and stupid. I was operating on some false assumptions. You're completely right of course, Razo. The 10 frame stack limit is very real indeed. My test data wasn't adequate to trigger deep recursions in the algorithm. Even if qsort didn't recurse that deeply, if you were to call this code from a sufficient depth yourself, it would still overflow. Seriously, maximum of 10 functions waiting on each other is not a lot.