Norbert Koch <norbert(a)s.netic.de> writes:
Hrvoje Niksic <hniksic(a)iskon.hr> writes:
> This patch cleans up some code in insdel.c and extents.c related to
> reporting before and after change functions. It does not fix the
^^^
> infamous modified-buffer-in-change-functions bug mentioned
before.
> The fix for that should come in later, if things are right. I've
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> separated this patch because it should be independent of the
other,
> and to make review easier.
Hi Hrvoje!
If this (too) is meant to fix the bug reported by me (wrt w3) then
sorry not yet.
Look for the highlighted words.
Fortunately, my patch was followed by a *second* patch, which when
applied after the first one DOES fix that crash (or so it should.)
Please test that one.
Do we have sort of a "off by one error"?
What we have is a "modification function changes the buffer endpoints
and trips the code that expects them to stay unchanged error". :-)
#6 0x8109b83 in signal_after_change (buf=0x82f8400, start=0,
orig_end=2909,
new_end=0) at insdel.c:2320
#7 0x810a9f9 in buffer_insert_string_1 (buf=0x82f8400, pos=2909,
nonreloc=0xbfbfd0f4 ">\n", reloc=136603652, offset=0, length=2,
flags=0)
at insdel.c:2594
What strikes me odd is, that the variable pos changed its value from
-1 to 2909 between these two calls (an optimisation issue?).
-1 means "the value of point". 2909 is the actual point.