unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* segfault with show-paren-mode
@ 2006-07-11 12:46 Peter Heslin
  2006-07-11 13:02 ` Nick Roberts
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Peter Heslin @ 2006-07-11 12:46 UTC (permalink / raw)



With a cvs update and emacs -q, and eval'ing
(setq show-paren-delay 0)
(show-paren-mode t)

visiting an elisp file and putting the cursor on a top-level left paren
in column 0 will cause a segfault.

Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000543dfd in scan_lists (from=140733193399312, count=1, depth=1, sexpflag=1)
    at syntax.c:2324
2324                  INC_BOTH (from, from_byte);
(gdb) xbacktrace
"scan-sexps" (0x15e78)
"byte-code" (0x1090863)
"show-paren-function" (0x90b991)
"apply" (0xe63bf1)
"byte-code" (0x801323)
"timer-event-handler" (0xd4ab84)
(gdb) 

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* segfault with show-paren-mode
  2006-07-11 12:46 segfault with show-paren-mode Peter Heslin
@ 2006-07-11 13:02 ` Nick Roberts
  2006-07-11 13:50   ` Peter Heslin
  2006-07-11 13:12 ` Stefan Monnier
  2006-07-11 13:54 ` Stefan Monnier
  2 siblings, 1 reply; 7+ messages in thread
From: Nick Roberts @ 2006-07-11 13:02 UTC (permalink / raw)
  Cc: emacs-devel

 > With a cvs update and emacs -q, and eval'ing
 > (setq show-paren-delay 0)
 > (show-paren-mode t)

Does it also happen with emacs -Q?

Please use report-emacs-bug for information about your build etc.

 > visiting an elisp file and putting the cursor on a top-level left paren
 > in column 0 will cause a segfault.

I don't see this on GNU/Linux.

 > Here is the backtrace:
 > 
 > Program received signal SIGSEGV, Segmentation fault.
 > 0x0000000000543dfd in scan_lists (from=140733193399312, count=1, depth=1, sexpflag=1)
 >     at syntax.c:2324
 > 2324                  INC_BOTH (from, from_byte);

This is the current frame, not the backtrace.  What do you get with "bt full"
as described with report-emacs-bug?

from seems to be a position in the buffer so I guess this is wrong:

 from=140733193399312
      ^^^^^^^^^^^^^^^
If no-one else can reproduce this, you will need to find out how it gets
this value using GDB.


-- 
Nick                                           http://www.inet.net.nz/~nickrob

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: segfault with show-paren-mode
  2006-07-11 12:46 segfault with show-paren-mode Peter Heslin
  2006-07-11 13:02 ` Nick Roberts
@ 2006-07-11 13:12 ` Stefan Monnier
  2006-07-11 13:59   ` Peter Heslin
  2006-07-11 13:54 ` Stefan Monnier
  2 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2006-07-11 13:12 UTC (permalink / raw)
  Cc: emacs-devel

> With a cvs update and emacs -q, and eval'ing
> (setq show-paren-delay 0)
> (show-paren-mode t)

> visiting an elisp file and putting the cursor on a top-level left paren
> in column 0 will cause a segfault.

[ Please use M-x report-emacs-bug for such things. ]

Would it happen to be on amd64?  If so, can you try to recompile syntax.c
without the -O2 (or with -O1) and see if it tames the bug?


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: segfault with show-paren-mode
  2006-07-11 13:02 ` Nick Roberts
@ 2006-07-11 13:50   ` Peter Heslin
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Heslin @ 2006-07-11 13:50 UTC (permalink / raw)


Nick Roberts <nickrob@snap.net.nz> writes:

> Does it also happen with emacs -Q?

Yes.

> Please use report-emacs-bug for information about your build etc.

Sorry -- the emacs I built is too unstable to run report-bug-emacs, but
the info from it is appended below.  

>  > visiting an elisp file and putting the cursor on a top-level left paren
>  > in column 0 will cause a segfault.
>
> I don't see this on GNU/Linux.

I am running GNU/Linux on amd64.

> This is the current frame, not the backtrace.  What do you get with "bt full"
> as described with report-emacs-bug?

(gdb) bt full
#0  0x0000000000543dfd in scan_lists (from=140733193399312, count=1, depth=1, 
    sexpflag=1) at syntax.c:2324
        len = Variable "len" is not available.

While trying to look at syntax.c with this build, I got another
segfault:

(gdb) bt full
#0  0x0000000000546bc7 in Fforward_comment (count=Variable "count" is not available.
) at syntax.c:2075
        _syntax_tbl = Variable "_syntax_tbl" is not available.

Since I am indeed on amd64, I will try Stefan's suggestion of
re-compiling with -O1.

Build info:

In GNU Emacs 22.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.8.6)
 of 2006-07-11 on class03
X server distributor `The X.Org Foundation', version 11.0.60802000
configured using `configure '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
M-x r e p o <tab> r <tab> <return>

Recent messages:
(/home/pj/emacs-cvs-source/emacs/src/emacs -Q)
For information about the GNU Project and its goals, type C-h C-p.
Making completion list...
Loading help-mode...done
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: segfault with show-paren-mode
  2006-07-11 12:46 segfault with show-paren-mode Peter Heslin
  2006-07-11 13:02 ` Nick Roberts
  2006-07-11 13:12 ` Stefan Monnier
@ 2006-07-11 13:54 ` Stefan Monnier
  2006-07-11 14:34   ` Peter Heslin
  2 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2006-07-11 13:54 UTC (permalink / raw)
  Cc: emacs-devel

> With a cvs update and emacs -q, and eval'ing
> (setq show-paren-delay 0)
> (show-paren-mode t)

> visiting an elisp file and putting the cursor on a top-level left paren
> in column 0 will cause a segfault.

I believe I've installed a patch which fixes this.  Please try again,


        Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: segfault with show-paren-mode
  2006-07-11 13:12 ` Stefan Monnier
@ 2006-07-11 13:59   ` Peter Heslin
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Heslin @ 2006-07-11 13:59 UTC (permalink / raw)


Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Would it happen to be on amd64? 

Yes.

> If so, can you try to recompile syntax.c without the -O2 (or with -O1)
> and see if it tames the bug?

Your crystal ball is in good working order.  Recompiling Emacs with -O1
fixes the bug.

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: segfault with show-paren-mode
  2006-07-11 13:54 ` Stefan Monnier
@ 2006-07-11 14:34   ` Peter Heslin
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Heslin @ 2006-07-11 14:34 UTC (permalink / raw)


Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I believe I've installed a patch which fixes this.  Please try again,

I compiled again with -O2 and with your change to syntax.c the bug is
gone.  Thanks very much for fixing this.

-- 
Peter Heslin (http://www.dur.ac.uk/p.j.heslin)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-07-11 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-11 12:46 segfault with show-paren-mode Peter Heslin
2006-07-11 13:02 ` Nick Roberts
2006-07-11 13:50   ` Peter Heslin
2006-07-11 13:12 ` Stefan Monnier
2006-07-11 13:59   ` Peter Heslin
2006-07-11 13:54 ` Stefan Monnier
2006-07-11 14:34   ` Peter Heslin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).