Issue 1017 whatsnew stack overflow

Title whatsnew stack overflow
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List bringert, darcs-devel, dmitry.kurochkin, ganesh, kowey, thorkilnaur
Assigned To ganesh
Topics Performance

Created on 2008-08-18.16:37:38 by dagit, last changed 2009-08-27.14:17:50 by admin.

msg5583 (view) Author: dagit Date: 2008-08-18.16:37:36
This was reported in IRC and I don't have a test case, but creating one should
be simple:

00:33 <bringert> darcs 2.0.2 overflows the stack when running 'darcs what' in a 
                 repo where a small file has been replaced by a 3M text file 
                 containing no newlines
00:34 <twb> bringert: did you build with GHC 6.8.3 or .2?
00:34 <bringert> 6.8.2
00:34 <twb> There are known issues with 6.8.2
00:36 ~~~ bringert upgrades ghc
02:47 <bringert> darcs 2.0.2 compiled with GHC 6.8.3 has the same stack 
                 overflow problem

My hunch is that is most likely lies in smart_diff or maybe some code that
creates a patch to display the results of whatsnew.
msg5585 (view) Author: bringert Date: 2008-08-18.18:46:44
Steps to reproduce:

$ darcs init 
$ ghc -e "writeFile \"foo\" (replicate 4000 'x')"
$ darcs add foo
$ darcs record -a -m 'foo' foo
$ ghc -e "writeFile \"foo\" (replicate 4000000 'y')"
$ darcs what
Stack space overflow: current size 8000016 bytes.
Use `+RTS -Ksize' to increase it.
msg6454 (view) Author: ganesh Date: 2008-10-25.13:30:05
This is now fixed on the sprint branch (http://code.haskell.org/darcs/sprint/)
by either of the following two patches. They both make sense anyway, so I will
submit them both.

Sat Oct 25 13:23:31 BST 2008  Ganesh Sittampalam <ganesh@earth.li>
  * just hash the last 20 characters in LCS

Sat Oct 25 13:18:57 BST 2008  Ganesh Sittampalam <ganesh@earth.li>
  * accumulate hash strictly in hash/hashPS
msg7713 (view) Author: ganesh Date: 2009-04-17.10:26:59
This is fixed in darcs 2.2.0. Only the "accumulate hash strictly" patch was kept
as the "hash last 20 characters" was actually a bad idea.
Date User Action Args
2008-08-18 16:37:38dagitcreate
2008-08-18 18:46:46bringertsetstatus: unread -> unknown
nosy: + bringert
messages: + msg5585
2008-08-18 19:47:07koweysettopic: + Performance
2008-10-25 13:30:09ganeshsetstatus: unknown -> has-patch
nosy: + dmitry.kurochkin, simon, kowey, ganesh, thorkilnaur
messages: + msg6454
assignedto: ganesh
2009-04-17 10:27:02ganeshsetstatus: has-patch -> resolved-in-stable
nosy: beschmi, kowey, dagit, ganesh, simon, thorkilnaur, dmitry.kurochkin, bringert
messages: + msg7713
2009-04-22 03:24:53twbsetstatus: resolved-in-stable -> resolved
nosy: beschmi, kowey, dagit, ganesh, simon, thorkilnaur, dmitry.kurochkin, bringert
2009-08-06 21:11:40adminsetnosy: - beschmi
2009-08-10 23:43:10adminsetnosy: - dagit
2009-08-25 17:32:24adminsetnosy: + darcs-devel, - simon
2009-08-27 14:17:50adminsetnosy: kowey, darcs-devel, ganesh, thorkilnaur, dmitry.kurochkin, bringert