Article View: gnu.emacs.bug
Article #99666scrolling, selective display bug
From: carroll
Date: Wed, 27 Jun 1990 20:40
Date: Wed, 27 Jun 1990 20:40
45 lines
2606 bytes
2606 bytes
Bug: selective display can cause core dumps.
Version: 18.52, Sun3 / SunOS4.0.3
Repeat by: Insert the following text into *scratch*.
(defun event::handler ()
(let*
(
(when (and callback (functionp callback))
(unwind-protect
;; BODY
(funcall callback event::type event::value event::screen)
;; CLEAN-UP
(when (null epoch::event-handler) ;something got hosed
(setq epoch::event-handler 'event::handler) ;reinstall me
(ignore-event event::type) ;inhibit the handler
)
)
Set selective-display to 16. Scroll left 36. Refresh display. Emacs aborts.
Cause: [ Warning - this gets technical! ]
In display_text_line(), hpos can be a large negative number, if the window is
horizontally scrolled. p1 is set to be line->body + hpos, which means that
(p1 < line->body) can be true. Another variable startp is set to line->body
+ w->width, and in most cases p1 is checked against startp to verify that it
is inside the body of the display_line struct. Also, p1prev is set to be p1
at the start of the main display loop, so that p1prev < line->body can also
be true (if it is true for p1). Selective display does not use p1, but p1prev,
and _does not check the value against startp_. This means that if the " ..."
is scrolled off the left edge of the window far enough, the " ..." will
overwrite parts of the display_line structure, an obviously unhealthy thing
to do.
Fix: None yet, but shouldn't be too hard. The key question is, if the " ..."
is scrolled off the left, should it
1. Be blown off and not plotted at all?
2. Be truncated on the left (and the non-scrolled portion plotted?)
3. Always be plotted in its entirety?
Answer this question, and I'll generate a fix.
Alan M. Carroll Barbara/Marilyn in '92 :
carroll@cs.uiuc.edu + This time, why not choose the better halves?
Epoch Development Team
CS Grad / U of Ill @ Urbana ...{ucbvax,pur-ee,convex}!cs.uiuc.edu!carroll
Technical Details
Message-ID:
<51300009@m.cs.uiuc.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!carrollShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,c4afe409afbaedc1,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-06-28 12:04:10 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!maverick.ksu.ksu.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!carroll From: carroll@m.cs.uiuc.edu Newsgroups: gnu.emacs.bug Subject: scrolling, selective display bug Message-ID: <51300009@m.cs.uiuc.edu> Date: 27 Jun 90 20:40:00 GMT Lines: 45 Nf-ID: #N:m.cs.uiuc.edu:51300009:000:1967 Nf-From: m.cs.uiuc.edu!carroll Jun 27 15:40:00 1990 Posted: Wed Jun 27 21:40:00 1990