Subject: bug#11717: 24.1.50; Segmentation fault in Fdelete_other_windows_internal when running Gnus unit tests

From: David Engster <[email-masked]>
Date: Fri, 15 Jun 2012 21:00:29 +0200

Eli Zaretskii writes:
> This is a duplicate of 11677.

Sorry. I should have searched better.

>  I asked there to find out which parts of MOUSE_HL_INFO cause the
> segfault, and also perhaps provide a simpler test case.  Can you do
> that?

Generating a simple test case will be difficult since it involves the
pretty complicated Gnus window configurations. But I'll try to come up
with something.

Regarding MOUSE_HL_INFO, I guess this

(gdb) p f->output_data
$6 = {
  tty = 0x0,
  x = 0x0,
  w32 = 0x0,
  ns = 0x0,
  nothing = 0
}

doesn't play well with either expression which might get executed in the
macro. FRAME_WINDOW_P(f) is false since output_method is
'output_initial', hence it tries to access
output_data.tty->display_info->mouse_highlight.

Here's the complete frame structure:

(gdb) print *f
$9 = {
  header = {
    size = 1073742870, 
    next = {
      nbytes = 384, 
      buffer = 0x180, 
      vector = 0x180
    }
  }, 
  name = 137092657, 
  icon_name = 139113722, 
  title = 139113722, 
  focus_frame = 139113722, 
  root_window = 139572509, 
  selected_window = 139160437, 
  minibuffer_window = 139160725, 
  param_alist = 139113722, 
  scroll_bars = 139113722, 
  condemned_scroll_bars = 139113722, 
  menu_bar_items = 139113722, 
  face_alist = 145828926, 
  menu_bar_vector = 139113722, 
  buffer_predicate = 139113722, 
  buffer_list = 147711830, 
  buried_buffer_list = 147676854, 
  menu_bar_window = 139113722, 
  tool_bar_window = 139113722, 
  tool_bar_items = 139113722, 
  tool_bar_position = 139139642, 
  desired_tool_bar_string = 139113722, 
  current_tool_bar_string = 139113722, 
  face_cache = 0x84e9eb8, 
  menu_bar_items_used = 0, 
  namebuf = 0x0, 
  current_pool = 0x84b7b20, 
  desired_pool = 0x84b7b08, 
  desired_matrix = 0x84b7b38, 
  current_matrix = 0x84b7b88, 
  glyphs_initialized_p = 1, 
  resized_p = 0, 
  force_flush_display_p = 0, 
  default_face_done_p = 0, 
  already_hscrolled_p = 0, 
  updated_p = 0, 
  minimize_tool_bar_window_p = 0, 
  external_tool_bar = 0, 
  tool_bar_lines = 0, 
  n_tool_bar_rows = 0, 
  n_tool_bar_items = 0, 
  decode_mode_spec_buffer = 0x84bb328 "", 
  insert_line_cost = 0x0, 
  delete_line_cost = 0x0, 
  insert_n_lines_cost = 0x0, 
  delete_n_lines_cost = 0x0, 
  text_lines = 10, 
  text_cols = 10, 
  total_lines = 0, 
  total_cols = 10, 
  new_text_lines = 0, 
  new_text_cols = 0, 
  left_pos = 0, 
  top_pos = 0, 
  pixel_height = 0, 
  pixel_width = 0, 
  resx = 0, 
  resy = 0, 
  x_pixels_diff = 0, 
  y_pixels_diff = 0, 
  win_gravity = 0, 
  size_hint_flags = 0, 
  border_width = 0, 
  internal_border_width = 0, 
  column_width = 1, 
  space_width = 0, 
  line_height = 1, 
  output_method = output_initial, 
  terminal = 0x84b6920, 
  output_data = {
    tty = 0x0, 
    x = 0x0, 
    w32 = 0x0, 
    ns = 0x0, 
    nothing = 0
  }, 
  font_driver_list = 0x0, 
  font_data_list = 0x0, 
  fringe_cols = 0, 
  left_fringe_width = 0, 
  right_fringe_width = 0, 
  want_fullscreen = FULLSCREEN_NONE, 
  menu_bar_lines = 1, 
  external_menu_bar = 0, 
  display_preempted = 0 '\000', 
  visible = 1 '\001', 
  iconified = 0 '\000', 
  async_visible = 1 '\001', 
  async_iconified = 0 '\000', 
  garbaged = 1 '\001', 
  has_minibuffer = 1 '\001', 
  wants_modeline = 1 '\001', 
---Type <return> to continue, or q <return> to quit---
  can_have_scroll_bars = 0 '\000', 
  auto_raise = 0 '\000', 
  auto_lower = 0 '\000', 
  no_split = 0 '\000', 
  explicit_name = 0 '\000', 
  window_sizes_changed = 1 '\001', 
  mouse_moved = 0 '\000', 
  pointer_invisible = 0 '\000', 
  vertical_scroll_bar_type = vertical_scroll_bar_none, 
  desired_cursor = FILLED_BOX_CURSOR, 
  cursor_width = 0, 
  blink_off_cursor = FILLED_BOX_CURSOR, 
  blink_off_cursor_width = 0, 
  message_buf = 0x84bb2f8 "", 
  scroll_bottom_vpos = 0, 
  config_scroll_bar_width = 0, 
  config_scroll_bar_cols = 0, 
  scroll_bar_actual_width = 0, 
  cost_calculation_baud_rate = 0, 
  alpha = {0, 0}, 
  gamma = 0, 
  extra_line_spacing = 0, 
  background_pixel = 4294967293, 
  foreground_pixel = 4294967294
}

-David