Subject: Re: bug#19971: 25.0.50; Emacs segfaults randomly

From: Jhair Tocancipa Triana <[email-masked]>
Date: Sat, 28 Feb 2015 22:10:21 +0100

I had the core file around and it says the following:

(gdb) f 7
#7  cache_image (f=0x28964a0, img=0x1fa8800) at image.c:1775
1775	  for (i = 0; i < c->used; ++i)
(gdb) print f->terminal->image_cache
$6 = (struct image_cache *) 0x0
(gdb) print *f
$7 = {header = {size = 4611686018477887507}, name = 82145892, icon_name = 0, 
  title = 0, focus_frame = 0, root_window = 41361077, 
  selected_window = 13378549, minibuffer_window = 37739669, 
  param_alist = 52487027, scroll_bars = 0, condemned_scroll_bars = 68854637, 
  menu_bar_items = 59926877, face_alist = 86485315, 
  menu_bar_vector = 45213117, buffer_predicate = 0, buffer_list = 88838691, 
  buried_buffer_list = 76296099, tool_bar_items = 0, 
  tool_bar_position = 46560, font_data = 44590787, face_cache = 0x2203470, 
  menu_bar_items_used = 0, current_pool = 0x0, desired_pool = 0x0, 
  desired_matrix = 0x0, current_matrix = 0x0, glyphs_initialized_p = true, 
  resized_p = false, default_face_done_p = true, already_hscrolled_p = false, 
  updated_p = false, external_tool_bar = false, fonts_changed = false, 
  cursor_type_changed = false, redisplay = true, external_menu_bar = true, 
  visible = 1, iconified = false, garbaged = false, wants_modeline = true, 
  auto_raise = false, auto_lower = false, no_split = false, 
  explicit_name = false, window_sizes_changed = false, mouse_moved = true, 
  pointer_invisible = false, frozen_window_starts = true, 
  output_method = output_x_window, want_fullscreen = FULLSCREEN_NONE, 
  vertical_scroll_bar_type = vertical_scroll_bar_right, 
  horizontal_scroll_bars = false, new_pixelwise = false, 
  can_x_set_window_size = true, after_make_frame = true, 
  tool_bar_redisplayed_once = false, tool_bar_lines = 0, tool_bar_height = 0, 
  n_tool_bar_rows = 0, n_tool_bar_items = 0, 
  decode_mode_spec_buffer = 0x289f200 "85%", insert_line_cost = 0x0, 
  delete_line_cost = 0x0, insert_n_lines_cost = 0x0, 
  delete_n_lines_cost = 0x0, text_cols = 80, text_lines = 35, total_cols = 83, 
  total_lines = 35, text_width = 560, text_height = 560, new_width = 0, 
  new_height = 0, left_pos = 309, top_pos = 334, pixel_width = 576, 
  pixel_height = 560, win_gravity = 1, size_hint_flags = 0, border_width = 0, 
  internal_border_width = 0, right_divider_width = 0, 
  bottom_divider_width = 0, left_fringe_width = 0, right_fringe_width = 0, 
  fringe_cols = 0, menu_bar_lines = 0, menu_bar_height = 0, column_width = 7, 
  line_height = 16, terminal = 0x10812e8, output_data = {tty = 0x271c600, 
    x = 0x271c600, w32 = 0x271c600, ns = 0x271c600, nothing = 41010688}, 
  font_driver_list = 0x2aa8f50, wait_event_type = 0, 
  desired_cursor = FILLED_BOX_CURSOR, cursor_width = 1, 
  blink_off_cursor = DEFAULT_CURSOR, blink_off_cursor_width = 0, 
  config_scroll_bar_width = 16, config_scroll_bar_cols = 3, 
  config_scroll_bar_height = 16, config_scroll_bar_lines = 1, 
  cost_calculation_baud_rate = 19200, alpha = {1, 1}, gamma = 0, 
  extra_line_spacing = 0, background_pixel = 16777215, foreground_pixel = 0}
(gdb) 

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked]
>> Date: Sat, 28 Feb 2015 17:16:28 +0100
>> 
>> 
>> Occasionaly C-x 5 2 or while playing chess emacs segfaults since some
>> weeks back. Haven't found a recipe to reproduce it. Here the gdb
>> backtrace:
>> 
>> (gdb) bt 30
>> #0  0x00007fe7581deb5b in raise (sig=sig@entry=11)
>>     at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
>> #1  0x00000000004e8034 in terminate_due_to_signal (sig=sig@entry=11, 
>>     backtrace_limit=backtrace_limit@entry=40) at emacs.c:378
>> #2  0x00000000004ff50e in handle_fatal_signal (sig=sig@entry=11)
>>     at sysdep.c:1604
>> #3  0x00000000004ff733 in deliver_thread_signal (sig=sig@entry=11, 
>>     handler=0x4ff500 <handle_fatal_signal>) at sysdep.c:1578
>> #4  0x00000000004ff7bf in deliver_fatal_thread_signal (sig=11)
>>     at sysdep.c:1616
>> #5  handle_sigsegv (sig=11, siginfo=<optimized out>, arg=<optimized out>)
>>     at sysdep.c:1667
>> #6  <signal handler called>
>> #7  cache_image (f=0x4ca3830, img=0x7c47f20) at image.c:1775
>
> When this happens, what is the value of FRAME_IMAGE_CACHE(f) in stack
> frame #7, i.e. on line 1775 of image.c?

-- 
Key fingerprint = 5917 806E 3A2F 659B BE6A  8DEE 04B5 52D9 BC07 29A4