Subject: bug#1295: Segfault with `M-- M-r' when `scroll-margin' > 0

From: martin rudalics <[email-masked]>
Date: Mon, 03 Nov 2008 08:16:49 +0100

>> Emacs crashes with segmentation fault when I type command `M-- M-r'
 >> while variable `scroll-margin' has value 1 more more.
 >>
 >>  1. $ emacs -Q
 >>
 >>  2. C-h r
 >>
 >>  3. Don't move the cursor. Set the `scroll-margin' variable:
 >>
 >>         M-x set-variable RET scroll-margin RET 4 RET
 >>
 >>  4. M-- M-r
 >>
 >>         Fatal error (11)Segmentation fault
 >
 > Hi Martin,
 >
 > I think this may be a consequence of your 2008-11-02 checkin to src (I
 > didn't pinpoint the exact change that caused it, though).
 >
 > Could you check?

The report was for Emacsen built as

     GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
     2008-10-17 on raven, modified by Debian

and development snapshot version

     GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of
     2008-10-18 on elegiac, modified by Debian

and I verified here that it crashes with a negative argument for all
versions I keep personally.

BTW, Richard apparently once tried to make `move-to-window-line' handle
scroll margins but failed somehow.

martin