GNU bug report logs - #15405
24.3; #[] freezes emacs

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Wed, 18 Sep 2013 01:52:02 UTC

Severity: normal

Merged with 16512

Found in version 24.3

Fixed in version 24.4

Done: Barry OReilly <gundaetiapo <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Barry OReilly <gundaetiapo <at> gmail.com>
Cc: stephen.berman <at> gmx.net, 15405 <at> debbugs.gnu.org, sdl.web <at> gmail.com
Subject: bug#15405: 24.3; #[] freezes emacs
Date: Wed, 18 Sep 2013 22:26:47 +0300
> Date: Wed, 18 Sep 2013 13:31:56 -0400
> From: Barry OReilly <gundaetiapo <at> gmail.com>
> 
> FWIW, only one M-: #[] is necessary in the reproduction recipe.
> 
> I used:
> 
> diff --git a/src/font.c b/src/font.c
> index 68db9f2..0f2d24f 100644
> --- a/src/font.c
> +++ b/src/font.c
> @@ -2619,6 +2619,12 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object
> spec, int size)
>    enum font_property_index prop;
>    int i;
> 
> +  bool noninteractive_old = noninteractive;
> +  { struct timespec debug_ts; char debug_dateStr[20]; {
> clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
> localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
> "%Y-%m-%dT%H:%M:%S", &mytm); }
> +       printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG: vec size=%ld\n", //
> TODO: debugging
> +                         debug_dateStr, debug_ts.tv_nsec, getpid(),
> pthread_self(), __FILE__, __LINE__, ASIZE(vec) ); fflush(stdout); }
> +  Fprin1(vec, Qnil);
> +  noninteractive = noninteractive_old;
>    for (val = Qnil, i = ASIZE (vec) - 1; i >= 0; i--)
>      {
>        entity = AREF (vec, i);
> 
> Got:
> 2013-09-18T13:15:22.845944000|pid:15278|tid:2868504832|font.c|2625| DEBUG:
> vec size=4
> 2013-09-18T13:15:22.847422000|pid:15278|tid:2868504832|font.c|2625| DEBUG:
> vec size=4611686018628714496
> Fatal error 11: Segmentation fault
> 
> Clearly the value of i was a 32 bit truncation of that larger value.

The next step is to put a hardware watchpoint on that vector, and see
who thrashes it.




This bug report was last modified 11 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.