On Fri, 27 Jun 2014 10:06:48 -0400 Mark H Weaver <[email protected]> wrote:
> Mario Domenech Goulart <[email protected]> writes: >> I'm using the CHICKEN port [1] of Guile's gap-buffer implementation and >> noticed a strange behavior in a simple test case. I can reproduce that >> behavior on Guile 2.0.5 and 2.0.9, but not on Guile 2.0.11. > > In Guile versions 2.0.0 - 2.0.9, there was a bug in 'string-copy!' such > that it did not work properly when the source and destination ranges > overlapped. The characters were always copied starting from the lowest > index, so it would fail when moving a block of characters to higher > indices. 'string-copy!' is used by 'substring-move!', which in turn is > used by 'gb-goto-char'. > > The bug was introduced in f846bd1a8f0e0d366fb8bb6944598641bc3dd246 when > the SRFI-13 functions were updated for Unicode, and fixed in > 793e8a9317d24298c82389bdf86b8ca17b4ee2f0. Many thanks for the detailed and straight-to-the-point info, Mark. It looks like CHICKEN's string-copy! is buggy. I've locally applied a fix to it and can confirm it fixes the gap-buffer issue. Best wishes. Mario -- http://parenteses.org/mario
