bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13743: 24.2.93; Segmentation fault when trying to [s]teal a file ope


From: Dmitry Gutov
Subject: bug#13743: 24.2.93; Segmentation fault when trying to [s]teal a file opened elsewhere
Date: Sun, 24 Feb 2013 19:28:32 +0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3

On 23.02.2013 22:44, Eli Zaretskii wrote:
I can fix this particular problem with this simple patch:
[...]
However, I'm not sure this is the right or the best way.  If it is, it
will probably be prudent to add some protection against infinite
recursion here.

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.

   /* If we're not starting on an interval boundary, we have to
     split this interval.  */
   if (i->position != s)
     {
       /* 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); <<<<<<<<<<<<<<<<<<<<<<<<<<<
          len -= got;
          i = next_interval (i);
        }
       else







reply via email to

[Prev in Thread] Current Thread [Next in Thread]