GNU bug report logs -
#13743
24.2.93; Segmentation fault when trying to [s]teal a file opened elsewhere
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Mon, 18 Feb 2013 07:14:01 UTC
Severity: important
Found in version 24.2.93
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Sun, 24 Feb 2013 19:28:32 +0400
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> CC: Stefan Monnier <monnier <at> iro.umontreal.ca>, 13743 <at> debbugs.gnu.org
>
> >> How 'bout moving the
> >>
> >> if (BUFFERP (object))
> >> modify_region (object, start, end);
> >>
> >> earlier in the function. Something like the patch below.
> >
> > This will (falsely, AFAIU) tell us that the region is about to be
> > modified when we return at the point marked below:
>
> I tried the patches, and both seem to work fine so far. If you could
> explain the practical implications of the drawback in Stefan's patch
> you're describing here, I'll try to test for that, too.
You need to simulate the situation which causes us to return here:
> > /* If this interval already has the properties, we can
> > skip it. */
> > if (interval_has_all_properties (properties, i))
> > {
> > ptrdiff_t got = (LENGTH (i) - (s - i->position));
> > if (got >= len)
> > RETURN_UNGCPRO (Qnil); <<<<<<<<<<<<<<<<<<<<<<<<<<<
This condition means that we find an interval which already has the
property we are trying to add, and that interval's length is at least
as large as the distance between START and END.
The simplest thing to try reproducing this would be to call
add-text-properties with the property that is already somewhere in the
buffer and with START and END that belong to the buffer region with
this property. I hope this will show you what happens.
The manifestation of the problem will be that modify_region will be
called in this case, although we don't actually modify anything. You
will probably see the "modified" indicator on the mode line, something
that shouldn't have happened.
This bug report was last modified 12 years and 87 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.