annotate .hgtags @ 827:a61728b58dc0

Fix array overflow bug in bdiff I ran into a bug while importing a large repository into mercurial. The diff algorithm does not allocate a big enough array of hunks for some test cases. This results in memory corruption, and possibly, as in my case, a seg fault. You should be able to reproduce this problem with any case of more than a few lines that follows this pattern: a b = = 1 1 2 2 3 4 3 5 . 4 . . 5 . . . I.e., "a" has blank lines on every other line that have been removed in "b". In this case, the number of matching hunks is equal to the number of lines in "b". This is more than ((an + bn)/4 + 2). I'm not sure what motivates this formula, but when I changed it to the smaller of an or bn (+ 1), it works. [comment added by mpm]
author "Wallace, Eric S" <eric.s.wallace@intel.com>
date Thu, 04 Aug 2005 13:25:59 -0800
parents 79fb7032739f
children 0bc72d91aeda 4f81068ed8cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
66
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
1 d40cc5aacc31ed673d9b5b24f98bee78c283062c 0.4f
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
2 1c590d34bf61e2ea12c71738e5a746cd74586157 0.4e
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
3 7eca4cfa8aad5fce9a04f7d8acadcd0452e2f34e 0.4d
5ec8b2ed858f Beginnings of changelog tagging
mpm@selenic.com
parents:
diff changeset
4 b4d0c3786ad3e47beacf8412157326a32b6d25a4 0.4c
189
37625132fe37 Add tag for 0.5
mpm@selenic.com
parents: 66
diff changeset
5 f40273b0ad7b3a6d3012fd37736d0611f41ecf54 0.5
194
4ec26766be83 Update tags
mpm@selenic.com
parents: 189
diff changeset
6 0a28dfe59f8fab54a5118c5be4f40da34a53cdb7 0.5b
458
ff8fbf99cd64 Added tag 0.6 for changeset 12e0fdbc57a0be78f0e817fd1d170a3615cd35da
mpm@selenic.com
parents: 194
diff changeset
7 12e0fdbc57a0be78f0e817fd1d170a3615cd35da 0.6
685
79fb7032739f Added tag 0.6b for changeset 4ccf3de52989b14c3d84e1097f59e39a992e00bd
Matt Mackall <mpm@selenic.com>
parents: 458
diff changeset
8 4ccf3de52989b14c3d84e1097f59e39a992e00bd 0.6b