Sylvestre Ledru <sylvestre <at>> writes:

> Hello,
> Trying to do some stats using the Firefox git repository
> (, I found a bug
> on git describe. The following command will segfault:
> git describe --contains a9ff31aebd6dbda82a3c733a72eeeaa0b0525b96
> Please note that the Firefox history is a pretty long and this commit
> date is 2001.
> I experience this issue with the git version, and Debian packages
> (1.9.0-1 and 2.0~next.20140214-2)
> As attachment, the backtrace. I removed about 87250 calls to the
> name_rev function. I guess that is a potential source of problem.
> Full is available here:
> (21 MB)
> I am available to test patches if needed.
> Thanks,
> Sylvestre
> PS: I am not registered, please cc me.


The name_rev function recursively calls itself which is why the backtrace is
so big. Unfortunately, for repos with long histories it can lead to Stack
Overflows. This is pretty much what happened in your case.

I tested it on my computer and I get the same results. I managed to get it
working by doubling my default stacksize:

ulimit -S -s 16192

Considering your project is a very large one and merely allocating a few
more resources fixes the problem, I'm not sure it warrants rewriting the
function to use less stack. You will have to wait for one of the maintainers
to give you a definitive answer.

All the best,

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to