[issue1940] bdiff can sometimes create a stack overflow

Alistair Bell bugs at mercurial.selenic.com
Tue Dec 8 18:43:59 UTC 2009


New submission from Alistair Bell <mercurial at bellsonline.com>:

In converting a big Perforce repo to hg recently, I had to iron out a few
issues. One of them was that bdiff was giving me a stack overflow on some
big diffs. It looks like the developer of bdiff was expecting the compiler
to do tail-recursion optimization, and for whatever reason GCC 3.4.6 wasn't
doing it.

I converted the tail recursion to iteration, and everything worked. I'm
attaching a patch. (There's a little bonus patch in there too, to make
conversion from Perforce of filenames with spaces in them work.)

----------
files: recurse.patch
messages: 11176
nosy: ThreeIfByAir
priority: bug
status: unread
title: bdiff can sometimes create a stack overflow

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1940>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recurse.patch
Type: application/octet-stream
Size: 1602 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091208/f583a618/attachment.obj>


More information about the Mercurial-devel mailing list