There is a recursive call to mark_uninteresting() in revwalk.c. This causes stack overflow on large repositories.