bdiff stack overflow patch

Alistair Bell alistair at bellsonline.com
Tue Dec 8 13:23:45 CST 2009


Hi all,

As mentioned in http://mercurial.selenic.com/bts/issue1940 I found
that I was getting a stack overflow in bdiff. You could possibly blame
GCC 3.4.6 for not recognizing that it should optimize the code as tail
recursion, but I converted the tail recursion to iteration and the
problems went away.

Patch is attached.

Alistair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recurse.patch
Type: application/octet-stream
Size: 1083 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20091208/1bc9ee89/attachment.obj>


More information about the Mercurial-devel mailing list