unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Emacs 23.0.60 build problem on CANNOT_DUMP platform GNUstep
       [not found] <10a6b343c3fbc4d2cd42099b31d644c9@lagorda>
@ 2008-01-31 10:45 ` YAMAMOTO Mitsuharu
  2008-01-31 10:56   ` YAMAMOTO Mitsuharu
  2008-01-31 12:55   ` Chris
  0 siblings, 2 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-01-31 10:45 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: Chris

>>>>> On Wed, 30 Jan 2008 09:13:06 -1000, Chris <cjh@insidernewswire.com> said:

> It seems emacs-pretest-bug list is no longer active, so I decided to
> send this here.

Bug reports posted to emacs-pretest-bug@gnu.org are now forwarded to
emacs-devel@gnu.org, and it is still the appropriate place to post a
report for the prerelease version.

> This was originally sent to the emacs-app-dev-@lists.sourceforge.net.  
> The folks there helped come up with a workaround/possible solution, 
> and YAMAMOTO Mitsuharu on that list suggested I send a report to 
> emacs-pretest-bug.

In short, creation of Vprocess_environment from `environ' in
set_initial_environment (callproc.c) is done without a terminating
Qnil as its initial value on CANNOT_DUMP platforms.
Vprocess_environment is supposed to be initialized to Qnil in
syms_of_callproc, but it is actually called after the creation of
Vprocess_environment on CANNOT_DUMP platforms.

void
set_initial_environment ()
{
  register char **envp;
#ifndef CANNOT_DUMP
  if (initialized)
#endif
    {
      for (envp = environ; *envp; envp++)
	Vprocess_environment = Fcons (build_string (*envp),
				      Vprocess_environment);
      /* Ideally, the `copy' shouldn't be necessary, but it seems it's frequent
	 to use `delete' and friends on process-environment.  */
      Vinitial_environment = Fcopy_sequence (Vprocess_environment);
    }
}

> This seems to work -- the build completes normally.

> The inserted line is isolated below:
> ======================================================
> #ifndef CANNOT_DUMP
> if (initialized)
> #endif
> {

> Vprocess_environment = Qnil;

> for (envp = environ; *envp; envp++)
> Vprocess_environment = Fcons (build_string (*envp),
> ======================================================

I just asked the OP to try this workaround in order to recognize the
situation.  So it might not be a right solution.  Experts on this part
may provide a better one.

Also, even with this workaround, CANNOT_DUMP seems to show further
problems.  The following backtrace is from the same author originally at
http://sourceforge.net/mailarchive/forum.php?thread_name=6e099bf81497c842e230c086b73253c8%40lagorda&forum_name=emacs-app-dev-

  ====================================================
  ~/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/src$ gdb 
  ../nextstep/build/Emacs.app/Emacs
  GNU gdb 6.3-debian

  DISPLAY = :0.0
  TERM = linux
  Breakpoint 1 at 0x81391f4: file sysdep.c, line 1444.

  (gdb) break xfaces.c:6703
  Breakpoint 2 at 0x81149ab: file xfaces.c, line 6703.

  (gdb) run
  Starting program: 
  /home/cjh/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/nextstep/build/Emacs.app/Emacs 
  -geometry 80x40+0+0
  [Thread debugging using libthread_db enabled]
  [New Thread -1223024512 (LWP 30047)]
  [Switching to Thread -1223024512 (LWP 30047)]

  Breakpoint 2, Fdisplay_supports_face_attributes_p 
  (attributes=140908901, display=139122972)
  at xfaces.c:6703
  6703 def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);

  (gdb) info locals
  attributes = 1
  display = -1077660624
  supports = 1
  i = 1
  frame = 0
  def_face = (struct face *) 0x83ad51c
  attrs = {138679945, 138679945, 138679945, 138679945, 138679945, 
  138679633,
  138679945 <repeats 12 times>}

  (gdb) p f
  $1 = (struct frame *) 0x1

  (gdb) cont
  Continuing.

  Program received signal SIGSEGV, Segmentation fault.
  0x081149b4 in Fdisplay_supports_face_attributes_p 
  (attributes=140908901, display=139122972)
  at xfaces.c:6703
  6703 def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);

  (gdb) bt full 3
  #0 0x081149b4 in Fdisplay_supports_face_attributes_p 
  (attributes=140908901, display=139122972)
  at xfaces.c:6703
  attributes = 0
  display = -1077660624
  supports = 0
  i = 0
  frame = 139122968
  def_face = (struct face *) 0x83ad51c
  attrs = {138679945, 138679945, 138679945, 138679945, 
  138679945, 138679633,
  138679945 <repeats 12 times>}
  #1 0x08197e24 in Ffuncall (nargs=3, args=0xbfc43530) at eval.c:3034
  fun = 139122968
  original_fun = -1077660624
  funcar = -1077660624
  numargs = 2
  lisp_numargs = 139122968
  val = 140908888
  backtrace = {
  next = 0xbfc43660,
  function = 0xbfc43530,
  args = 0xbfc43534,
  nargs = 2,
  evalargs = 0 '\0',
  debug_on_exit = 0 '\0'
  }

  (gdb) bt
  #0 0x081149b4 in Fdisplay_supports_face_attributes_p 
  (attributes=140908901, display=139122972)
  at xfaces.c:6703
  #1 0x08197e24 in Ffuncall (nargs=3, args=0xbfac13b0) at eval.c:3034
  #2 0x081c4228 in Fbyte_code (bytestr=136865075, vector=136865092, 
  maxdepth=5) at bytecode.c:679
  #3 0x0819826e in funcall_lambda (fun=136865028, nargs=2, 
  arg_vector=0xbfac1534) at eval.c:3222
  #4 0x08197cbd in Ffuncall (nargs=3, args=0xbfac1530) at eval.c:3088
  #5 0x081c4228 in Fbyte_code (bytestr=136865331, vector=136865348, 
  maxdepth=4) at bytecode.c:679
  #6 0x0819826e in funcall_lambda (fun=136865276, nargs=2, 
  arg_vector=0xbfac16a4) at eval.c:3222
  #7 0x08197cbd in Ffuncall (nargs=3, args=0xbfac16a0) at eval.c:3088
  #8 0x081c4228 in Fbyte_code (bytestr=136865635, vector=136865652, 
  maxdepth=6) at bytecode.c:679
  #9 0x0819826e in funcall_lambda (fun=136865572, nargs=3, 
  arg_vector=0xbfac1824) at eval.c:3222
  #10 0x08197cbd in Ffuncall (nargs=4, args=0xbfac1820) at eval.c:3088
  #11 0x081c4228 in Fbyte_code (bytestr=136842019, vector=136842036, 
  maxdepth=5) at bytecode.c:679
  #12 0x0819826e in funcall_lambda (fun=136841948, nargs=5, 
  arg_vector=0xbfac19a4) at eval.c:3222
  #13 0x08197cbd in Ffuncall (nargs=6, args=0xbfac19a0) at eval.c:3088
  #14 0x081c4228 in Fbyte_code (bytestr=145632179, vector=145637700, 
  maxdepth=29) at bytecode.c:679
  #15 0x08197068 in Feval (form=140909333) at eval.c:2367
  #16 0x081ae8d3 in readevalloop (readcharfun=139121545, 
  stream=0x8ad4468, sourcename=145584283,
  evalfun=0x8196c60 <Feval>, printflag=0, unibyte=138653505, 
  readfun=138653505, start=138653505,
  end=138653505) at lread.c:1765
  #17 0x081ad704 in Fload (file=145584123, noerror=138653505, 
  nomessage=138653505,
  nosuffix=138653505, must_suffix=138653505) at lread.c:1226
  #18 0x081970c7 in Feval (form=140869885) at eval.c:2375
  #19 0x081ae8d3 in readevalloop (readcharfun=139121545, 
  stream=0x860c468, sourcename=140541227,
  evalfun=0x8196c60 <Feval>, printflag=0, unibyte=138653505, 
  readfun=138653505, start=138653505,
  end=138653505) at lread.c:1765
  #20 0x081ad704 in Fload (file=140541035, noerror=138653505, 
  nomessage=138653505,
  nosuffix=138653505, must_suffix=138653505) at lread.c:1226
  #21 0x081970c7 in Feval (form=138637701) at eval.c:2375
  #22 0x0811f334 in top_level_2 () at keyboard.c:1410
  #23 0x08195b3c in internal_condition_case (bfun=0x811f310 
  <top_level_2>, handlers=139036201,
  hfun=0x811eee0 <cmd_error>) at eval.c:1497
  #24 0x0811f38a in top_level_1 () at keyboard.c:1418
  #25 0x08195699 in internal_catch (tag=139031049, func=0x811f340 
  <top_level_1>, arg=138653505)
  at eval.c:1233
  #26 0x0811f26a in command_loop () at keyboard.c:1373
  #27 0x0811ea97 in recursive_edit_1 () at keyboard.c:989
  #28 0x0811ec3f in Frecursive_edit () at keyboard.c:1051
  #29 0x0811cb94 in main (argc=3, argv=0xbfac2fa4) at emacs.c:1862

  Lisp Backtrace:
  "display-supports-face-attributes-p" (0xbfac13b4)
  "face-spec-set-match-display" (0xbfac1534)
  "face-spec-choose" (0xbfac16a4)
  "face-spec-set" (0xbfac1824)
  "custom-declare-face" (0xbfac19a4)
  "byte-code" (0xbfac1af0)
  "load" (0xbfac21d0)
  "load" (0xbfac28b0)

  (gdb)
  =================================================

I could reproduce a similar backtrace with the X11 build of Emacs
23.0.50 on Mac OS X by deliberately defining CANNOT_DUMP.  In the
above backtrace, several values might become unreliable because of
optimization.  I could get the following output by turning it off.

6235	  def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
(gdb) info locals
supports = 0
i = 17
frame = 13636396
f = (struct frame *) 0xd01328
def_face = (struct face *) 0x1808b11
attrs = {25201737, 25201737, 25201737, 25201737, 25201737, 25201425, 25201737 <repeats 11 times>}
(gdb) p *f
$2 = {
  size = 1073742869, 
  next = 0xd01208, 
  name = 25220731, 
  icon_name = 25165833, 
  title = 25165833, 
  focus_frame = 25165833, 
  root_window = 13636812, 
  selected_window = 13636812, 
  minibuffer_window = 13637180, 
  param_alist = 25165833, 
  scroll_bars = 25165833, 
  condemned_scroll_bars = 25165833, 
  menu_bar_items = 25165833, 
  face_alist = 7789661, 
  menu_bar_vector = 25165833, 
  buffer_predicate = 25165833, 
  buffer_list = 7629717, 
  buried_buffer_list = 25165833, 
  menu_bar_window = 25165833, 
  tool_bar_window = 25165833, 
  tool_bar_items = 25165833, 
  desired_tool_bar_string = 25165833, 
  current_tool_bar_string = 25165833, 
  face_cache = 0x0, 
  menu_bar_items_used = 0, 
  namebuf = 0x0, 
  current_pool = 0xd03d08, 
  desired_pool = 0xd03ce8, 
  desired_matrix = 0x1839408, 
  current_matrix = 0x1839808, 
  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, 
  tool_bar_lines = 0, 
  n_tool_bar_rows = 0, 
  n_tool_bar_items = 0, 
  decode_mode_spec_buffer = 0xd03ea8 "", 
  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, 
  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 = 0xd01208, 
  output_data = {
    tty = 0x0, 
    x = 0x0, 
    w32 = 0x0, 
    mac = 0x0, 
    nothing = 0
  }, 
  fringe_cols = 0, 
  left_fringe_width = 0, 
  right_fringe_width = 0, 
  want_fullscreen = 0, 
  menu_bar_lines = 0, 
  external_menu_bar = 0, 
  display_preempted = 0 '\0', 
  visible = 1 '\001', 
  iconified = 0 '\0', 
  async_visible = 1 '\001', 
  async_iconified = 0 '\0', 
  garbaged = 1 '\001', 
  has_minibuffer = 1 '\001', 
  wants_modeline = 1 '\001', 
  can_have_scroll_bars = 0 '\0', 
  auto_raise = 0 '\0', 
  auto_lower = 0 '\0', 
  no_split = 0 '\0', 
  explicit_name = 0 '\0', 
  window_sizes_changed = 1 '\001', 
  mouse_moved = 0 '\0', 
  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 = 0xd03e68 "", 
  scroll_bottom_vpos = 0, 
  config_scroll_bar_width = 0, 
  config_scroll_bar_cols = 0, 
  scroll_bar_actual_width = 0, 
  cost_calculation_baud_rate = 0, 
  gamma = 0, 
  extra_line_spacing = 0, 
  background_pixel = 4294967293, 
  foreground_pixel = 4294967294

I guess the CANNOT_DUMP situation has not been fully tested after the
multi-tty merger.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: Emacs 23.0.60 build problem on CANNOT_DUMP platform GNUstep
  2008-01-31 10:45 ` Emacs 23.0.60 build problem on CANNOT_DUMP platform GNUstep YAMAMOTO Mitsuharu
@ 2008-01-31 10:56   ` YAMAMOTO Mitsuharu
  2008-01-31 12:55   ` Chris
  1 sibling, 0 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-01-31 10:56 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: Chris

>>>>> On Thu, 31 Jan 2008 19:45:41 +0900, YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> said:

>>>>> On Wed, 30 Jan 2008 09:13:06 -1000, Chris <cjh@insidernewswire.com> said:
>> It seems emacs-pretest-bug list is no longer active, so I decided
>> to send this here.

> Bug reports posted to emacs-pretest-bug@gnu.org are now forwarded to
> emacs-devel@gnu.org, and it is still the appropriate place to post a
> report for the prerelease version.

Oops, I forgot to tell that "here" above means bug-gnu-emacs@gnu.org.
The original report posted there can be found at
http://thread.gmane.org/gmane.emacs.bugs/17436 .

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




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

* Re: Emacs 23.0.60 build problem on CANNOT_DUMP platform GNUstep
  2008-01-31 10:45 ` Emacs 23.0.60 build problem on CANNOT_DUMP platform GNUstep YAMAMOTO Mitsuharu
  2008-01-31 10:56   ` YAMAMOTO Mitsuharu
@ 2008-01-31 12:55   ` Chris
  1 sibling, 0 replies; 3+ messages in thread
From: Chris @ 2008-01-31 12:55 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: emacs-pretest-bug

I think I just discovered a bit more info concerning the optimizations 
mentioned by YAMAMOTO Mitsuharu.

Somewhere in this part of xfaces.c:

6696      CHECK_LIVE_FRAME (frame);
6697      f = XFRAME (frame);
6698
6699      for (i = 0; i < LFACE_VECTOR_SIZE; i++)
6700        attrs[i] = Qunspecified;
6701      merge_face_ref (f, attributes, attrs, 1, 0);

According to the gdb output below (I had to re-compile with -gstabs+ 
for 'f' to even print on my machine),
when we get to the breakpoint at 6696, 'f' seems -- to my uneducated 
eye -- to already contain a value valid enough that gdb goes ahead and 
prints it.  But I'm pretty sure its garbage.

When I issue 'step' to gdb, it doesn't stop at 6697, but at 6699 
instead, and 'f' still seems to contain the exact same address.

But when I set a breakpoint at 6701 -- the first statement after the 
loop -- and continue to it, 'f' now contains 0x12.

Then, if I step into merge_face_ref and 'p f', it has a 3rd distinct 
value.

After returning from merge_face_ref, 'p f' displays a *4th* value.

Especially interesting to me is that the 3rd value is the only that 
looks like it is actually valid, since the struct members 
'output_method', 'desired_cursor' and 'blink_off_cursor' have been 
filled in with names by gdb.

==================================================
Starting program: 
/home/cjh/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/nextstep/build/Emacs.app/Emacs 
-geometry 80x40+0+0
[Thread debugging using libthread_db enabled]
[New Thread -1222360960 (LWP 31645)]
[Switching to Thread -1222360960 (LWP 31645)]

Breakpoint 4, Fdisplay_supports_face_attributes_p 
(attributes=140907877, display=139122972)
     at xfaces.c:6696
6696      CHECK_LIVE_FRAME (frame);

(gdb) l 6690,6710
6690                                              XFRAME 
(frame)->param_alist)),
6691                                 display)))
6692                break;
6693            }
6694        }
6695
6696      CHECK_LIVE_FRAME (frame);
6697      f = XFRAME (frame);
6698
6699      for (i = 0; i < LFACE_VECTOR_SIZE; i++)
6700        attrs[i] = Qunspecified;
6701      merge_face_ref (f, attributes, attrs, 1, 0);
6702
6703      def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
6704      if (def_face == NULL)
6705        {
6706          if (! realize_basic_faces (f))
6707            error ("Cannot realize default face");
6708          def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
6709          if (def_face == NULL)
6710            abort ();  /* realize_basic_faces must have set it up  
*/

(gdb) p frame
$14 = 139122972

(gdb) pr
#<frame F1 0x84ad918>

(gdb) p f
$15 = (struct frame *) 0x83ecb5c

(gdb) p *f
$16 = {
   size = 138653505,
   next = 0x8498791,
   name = 139036969,
   icon_name = 138653505,
   title = 140457937,
   focus_frame = 140460833,
   root_window = 138653505,
   selected_window = 140460401,
   minibuffer_window = 140460857,
   param_alist = 140541507,
   scroll_bars = 140541475,
   condemned_scroll_bars = 140541523,
   menu_bar_items = 140541491,
   face_alist = 140541539,
   menu_bar_vector = 138653505,
   buffer_predicate = 138653505,
   buffer_list = 138653505,
   buried_buffer_list = 140438665,
   menu_bar_window = 138653505,
   tool_bar_window = 139049481,
   tool_bar_items = 140438689,
   desired_tool_bar_string = 140438737,
   current_tool_bar_string = 139054465,
   face_cache = 0x843af41,
   menu_bar_items_used = 140424417,
   namebuf = 0x85eb3f1 "",
   current_pool = 0x85eed01,
   desired_pool = 0x85eb3c1,
   desired_matrix = 0x85eb4c9,
   current_matrix = 0x85eece9,
   glyphs_initialized_p = 1,
   resized_p = 0,
   force_flush_display_p = 0,
   default_face_done_p = 1,
   already_hscrolled_p = 1,
   updated_p = 1,
   minimize_tool_bar_window_p = 0,
   external_tool_bar = 138653505,
   tool_bar_lines = 138653505,
   n_tool_bar_rows = 139049505,
   n_tool_bar_items = -1078695456,
   decode_mode_spec_buffer = 0x85eb1f9 "",
   insert_line_cost = 0x843af41,
   delete_line_cost = 0x85eb199,
   insert_n_lines_cost = 0x843af41,
   delete_n_lines_cost = 0x843af41,
   text_lines = 8,
   text_cols = 140423793,
   total_lines = 1000,
   total_cols = 138653505,
   new_text_lines = -1078695424,
   new_text_cols = 140423553,
   left_pos = 140423625,
   top_pos = -1078701088,
   pixel_height = 0,
   pixel_width = 140424057,
   resx = 2.3241811535839589e-268,
   resy = 2.3241534258806793e-268,
   x_pixels_diff = 138653505,
   y_pixels_diff = 140423649,
   win_gravity = 140729112,
   size_hint_flags = 140424033,
   border_width = 140423697,
   internal_border_width = 138653505,
   column_width = 100,
   space_width = 1,
   line_height = 140423601,
   output_method = 400,
   terminal = 0x0,
   output_data = {
     tty = 0x864d6b5,
     x = 0x864d6b5,
     w32 = 0x864d6b5,
     mac = 0x864d6b5,
     ns = 0x864d6b5,
     nothing = 140826293
   },
   font_driver_list = 0x0,
   fringe_cols = 138653505,
   left_fringe_width = 138653505,
   right_fringe_width = 140423769,
   want_fullscreen = -1,
   menu_bar_lines = 138653505,
   external_menu_bar = 140426577,
   display_preempted = -103 '\231',
   visible = -67 '\275',
   iconified = 94 '^',
   async_visible = 8 '\b',
   async_iconified = -31 '\341',
   garbaged = -74 '\266',
   has_minibuffer = 94 '^',
   wants_modeline = 8 '\b',
   can_have_scroll_bars = 41 ')',
   auto_raise = -73 '\267',
   auto_lower = 94 '^',
   no_split = 8 '\b',
   explicit_name = -71 '\271',
   window_sizes_changed = -73 '\267',
   mouse_moved = 94 '^',
   vertical_scroll_bar_type = 140869277,
   desired_cursor = 140426817,
   cursor_width = 140426769,
   blink_off_cursor = 140425169,
   blink_off_cursor_width = 140425025,
   message_buf = 0x85ebd69 "",
   scroll_bottom_vpos = 140425073,
   scroll_bottom_vpos = 140425073,
   config_scroll_bar_width = 140426793,
   config_scroll_bar_cols = 140424953,
   scroll_bar_actual_width = 140424905,
   cost_calculation_baud_rate = 140426625,
   gamma = 6.9380006746658039e-316,
   extra_line_spacing = 1,
   background_pixel = 140425121,
   foreground_pixel = 140426865
}

(gdb) step
6699      for (i = 0; i < LFACE_VECTOR_SIZE; i++)

(gdb) p f
$17 = (struct frame *) 0x83ecb5c

(gdb) break 6701
Note: breakpoint 5 also set at pc 0x811497a.
Breakpoint 6 at 0x811497a: file xfaces.c, line 6701.

(gdb) cont
Continuing.

Breakpoint 5, Fdisplay_supports_face_attributes_p 
(attributes=140907877, display=139122972)
     at xfaces.c:6701
6701      merge_face_ref (f, attributes, attrs, 1, 0);

(gdb) p f
$18 = (struct frame *) 0x12

(gdb) step
merge_face_ref (f=0x84ad918, face_ref=140907877, to=0xbfb45330, 
err_msgs=1, named_merge_points=0x0)
     at xfaces.c:3943
3943      int ok = 1;                   /* Succeed without an error? */

(gdb) p f
$20 = (struct frame *) 0x84ad918

(gdb) p *f
$21 = {
   size = 1073742869,
   next = 0x84ad628,
   name = 139109019,
   icon_name = 138653505,
   title = 138653505,
   focus_frame = 138653505,
   root_window = 139123380,
   selected_window = 139123380,
   minibuffer_window = 139123724,
   param_alist = 138653505,
   scroll_bars = 138653505,
   condemned_scroll_bars = 138653505,
   menu_bar_items = 138653505,
   face_alist = 140907277,
   menu_bar_vector = 138653505,
   buffer_predicate = 138653505,
   buffer_list = 138641957,
   buried_buffer_list = 138653505,
   menu_bar_window = 138653505,
   tool_bar_window = 138653505,
   tool_bar_items = 138653505,
   desired_tool_bar_string = 138653505,
   current_tool_bar_string = 138653505,
   face_cache = 0x0,
   menu_bar_items_used = 0,
   namebuf = 0x0,
   current_pool = 0x8608110,
   desired_pool = 0x86080f8,
   desired_matrix = 0x8608128,
   current_matrix = 0x8608378,
   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 = 0x860c038 "",
   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 = 0x84ad628,
   output_data = {
     tty = 0x0,
     x = 0x0,
     w32 = 0x0,
     mac = 0x0,
     ns = 0x0,
     nothing = 0
   },
   font_driver_list = 0x0,
   fringe_cols = 0,
   left_fringe_width = 0,
   right_fringe_width = 0,
   want_fullscreen = 0,
   menu_bar_lines = 0,
   external_menu_bar = 0,
   display_preempted = 0 '\0',
   visible = 1 '\001',
   iconified = 0 '\0',
   async_visible = 1 '\001',
   async_iconified = 0 '\0',
   garbaged = 1 '\001',
   has_minibuffer = 1 '\001',
   wants_modeline = 1 '\001',
   can_have_scroll_bars = 0 '\0',
   auto_raise = 0 '\0',
   auto_lower = 0 '\0',
   no_split = 0 '\0',
   explicit_name = 0 '\0',
   window_sizes_changed = 1 '\001',
   mouse_moved = 0 '\0',
   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 = 0x860c008 "",
   scroll_bottom_vpos = 0,
   config_scroll_bar_width = 0,
   config_scroll_bar_cols = 0,
   scroll_bar_actual_width = 0,
   cost_calculation_baud_rate = 0,
   gamma = 0,
   extra_line_spacing = 0,
   background_pixel = 4294967293,
   foreground_pixel = 4294967294
}

(gdb) cont
Continuing.

Breakpoint 2, Fdisplay_supports_face_attributes_p 
(attributes=140907877, display=139122972)
     at xfaces.c:6703
6703      def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);

(gdb) p f
$22 = (struct frame *) 0x1

(gdb) step

Program received signal SIGSEGV, Segmentation fault.
0x081149b4 in Fdisplay_supports_face_attributes_p 
(attributes=140907877, display=139122972)
     at xfaces.c:6703
6703      def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);

(gdb)
==================================================

On 2008-01-31 00:45:41 -1000 YAMAMOTO Mitsuharu 
<mituharu@math.s.chiba-u.ac.jp> wrote:

>>>>>> On Wed, 30 Jan 2008 09:13:06 -1000, Chris 
>>>>>> <cjh@insidernewswire.com> 
>>>>>> said:
> 
>> It seems emacs-pretest-bug list is no longer active, so I decided to
>> send this here.
> 
> Bug reports posted to emacs-pretest-bug@gnu.org are now forwarded to
> emacs-devel@gnu.org, and it is still the appropriate place to post a
> report for the prerelease version.
> 
>> This was originally sent to the 
>> emacs-app-dev-@lists.sourceforge.net.  The 
>> folks there helped come up with a workaround/possible solution, and 
>> YAMAMOTO Mitsuharu on that list suggested I send a report to 
>> emacs-pretest-bug.
> 
> In short, creation of Vprocess_environment from `environ' in
> set_initial_environment (callproc.c) is done without a terminating
> Qnil as its initial value on CANNOT_DUMP platforms.
> Vprocess_environment is supposed to be initialized to Qnil in
> syms_of_callproc, but it is actually called after the creation of
> Vprocess_environment on CANNOT_DUMP platforms.
> 
> void
> set_initial_environment ()
> {
>   register char **envp;
> #ifndef CANNOT_DUMP
>   if (initialized)
> #endif
>     {
>       for (envp = environ; *envp; envp++)
> 	Vprocess_environment = Fcons (build_string (*envp),
> 				      Vprocess_environment);
>       /* Ideally, the `copy' shouldn't be necessary, but it seems 
> it's frequent
> 	 to use `delete' and friends on process-environment.  */
>       Vinitial_environment = Fcopy_sequence (Vprocess_environment);
>     }
> }
> 
>> This seems to work -- the build completes normally.
> 
>> The inserted line is isolated below:
>> ======================================================
>> #ifndef CANNOT_DUMP
>> if (initialized)
>> #endif
>> {
> 
>> Vprocess_environment = Qnil;
> 
>> for (envp = environ; *envp; envp++)
>> Vprocess_environment = Fcons (build_string (*envp),
>> ======================================================
> 
> I just asked the OP to try this workaround in order to recognize the
> situation.  So it might not be a right solution.  Experts on this part
> may provide a better one.
> 
> Also, even with this workaround, CANNOT_DUMP seems to show further
> problems.  The following backtrace is from the same author originally 
> at
> http://sourceforge.net/mailarchive/forum.php?thread_name=6e099bf81497c842e230c086b73253c8%40lagorda&forum_name=emacs-app-dev-
> 
>   ====================================================
>   ~/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/src$ gdb 
> ../nextstep/build/Emacs.app/Emacs
>   GNU gdb 6.3-debian
> 
>   DISPLAY = :0.0
>   TERM = linux
>   Breakpoint 1 at 0x81391f4: file sysdep.c, line 1444.
> 
>   (gdb) break xfaces.c:6703
>   Breakpoint 2 at 0x81149ab: file xfaces.c, line 6703.
> 
>   (gdb) run
>   Starting program: 
> /home/cjh/GNUstep/Build/emacs-23.0.0_NS-9.0rc3/nextstep/build/Emacs.app/Emacs 
>   -geometry 80x40+0+0
>   [Thread debugging using libthread_db enabled]
>   [New Thread -1223024512 (LWP 30047)]
>   [Switching to Thread -1223024512 (LWP 30047)]
> 
>   Breakpoint 2, Fdisplay_supports_face_attributes_p  
> (attributes=140908901, 
> display=139122972)
>   at xfaces.c:6703
>   6703 def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
> 
>   (gdb) info locals
>   attributes = 1
>   display = -1077660624
>   supports = 1
>   i = 1
>   frame = 0
>   def_face = (struct face *) 0x83ad51c
>   attrs = {138679945, 138679945, 138679945, 138679945, 138679945,  
> 138679633,
>   138679945 <repeats 12 times>}
> 
>   (gdb) p f
>   $1 = (struct frame *) 0x1
> 
>   (gdb) cont
>   Continuing.
> 
>   Program received signal SIGSEGV, Segmentation fault.
>   0x081149b4 in Fdisplay_supports_face_attributes_p  
> (attributes=140908901, 
> display=139122972)
>   at xfaces.c:6703
>   6703 def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
> 
>   (gdb) bt full 3
>   #0 0x081149b4 in Fdisplay_supports_face_attributes_p  
> (attributes=140908901, 
> display=139122972)
>   at xfaces.c:6703
>   attributes = 0
>   display = -1077660624
>   supports = 0
>   i = 0
>   frame = 139122968
>   def_face = (struct face *) 0x83ad51c
>   attrs = {138679945, 138679945, 138679945, 138679945,  138679945, 
> 138679633,
>   138679945 <repeats 12 times>}
>   #1 0x08197e24 in Ffuncall (nargs=3, args=0xbfc43530) at eval.c:3034
>   fun = 139122968
>   original_fun = -1077660624
>   funcar = -1077660624
>   numargs = 2
>   lisp_numargs = 139122968
>   val = 140908888
>   backtrace = {
>   next = 0xbfc43660,
>   function = 0xbfc43530,
>   args = 0xbfc43534,
>   nargs = 2,
>   evalargs = 0 '\0',
>   debug_on_exit = 0 '\0'
>   }
> 
>   (gdb) bt
>   #0 0x081149b4 in Fdisplay_supports_face_attributes_p  
> (attributes=140908901, 
> display=139122972)
>   at xfaces.c:6703
>   #1 0x08197e24 in Ffuncall (nargs=3, args=0xbfac13b0) at eval.c:3034
>   #2 0x081c4228 in Fbyte_code (bytestr=136865075, vector=136865092, 
> maxdepth=5) at bytecode.c:679
>   #3 0x0819826e in funcall_lambda (fun=136865028, nargs=2, 
> arg_vector=0xbfac1534) at eval.c:3222
>   #4 0x08197cbd in Ffuncall (nargs=3, args=0xbfac1530) at eval.c:3088
>   #5 0x081c4228 in Fbyte_code (bytestr=136865331, vector=136865348, 
> maxdepth=4) at bytecode.c:679
>   #6 0x0819826e in funcall_lambda (fun=136865276, nargs=2, 
> arg_vector=0xbfac16a4) at eval.c:3222
>   #7 0x08197cbd in Ffuncall (nargs=3, args=0xbfac16a0) at eval.c:3088
>   #8 0x081c4228 in Fbyte_code (bytestr=136865635, vector=136865652, 
> maxdepth=6) at bytecode.c:679
>   #9 0x0819826e in funcall_lambda (fun=136865572, nargs=3, 
> arg_vector=0xbfac1824) at eval.c:3222
>   #10 0x08197cbd in Ffuncall (nargs=4, args=0xbfac1820) at eval.c:3088
>   #11 0x081c4228 in Fbyte_code (bytestr=136842019, vector=136842036, 
> maxdepth=5) at bytecode.c:679
>   #12 0x0819826e in funcall_lambda (fun=136841948, nargs=5, 
> arg_vector=0xbfac19a4) at eval.c:3222
>   #13 0x08197cbd in Ffuncall (nargs=6, args=0xbfac19a0) at eval.c:3088
>   #14 0x081c4228 in Fbyte_code (bytestr=145632179, vector=145637700, 
> maxdepth=29) at bytecode.c:679
>   #15 0x08197068 in Feval (form=140909333) at eval.c:2367
>   #16 0x081ae8d3 in readevalloop (readcharfun=139121545,  
> stream=0x8ad4468, 
> sourcename=145584283,
>   evalfun=0x8196c60 <Feval>, printflag=0, unibyte=138653505, 
> readfun=138653505, start=138653505,
>   end=138653505) at lread.c:1765
>   #17 0x081ad704 in Fload (file=145584123, noerror=138653505, 
> nomessage=138653505,
>   nosuffix=138653505, must_suffix=138653505) at lread.c:1226
>   #18 0x081970c7 in Feval (form=140869885) at eval.c:2375
>   #19 0x081ae8d3 in readevalloop (readcharfun=139121545,  
> stream=0x860c468, 
> sourcename=140541227,
>   evalfun=0x8196c60 <Feval>, printflag=0, unibyte=138653505, 
> readfun=138653505, start=138653505,
>   end=138653505) at lread.c:1765
>   #20 0x081ad704 in Fload (file=140541035, noerror=138653505, 
> nomessage=138653505,
>   nosuffix=138653505, must_suffix=138653505) at lread.c:1226
>   #21 0x081970c7 in Feval (form=138637701) at eval.c:2375
>   #22 0x0811f334 in top_level_2 () at keyboard.c:1410
>   #23 0x08195b3c in internal_condition_case (bfun=0x811f310  
> <top_level_2>, 
> handlers=139036201,
>   hfun=0x811eee0 <cmd_error>) at eval.c:1497
>   #24 0x0811f38a in top_level_1 () at keyboard.c:1418
>   #25 0x08195699 in internal_catch (tag=139031049, func=0x811f340 
> <top_level_1>, arg=138653505)
>   at eval.c:1233
>   #26 0x0811f26a in command_loop () at keyboard.c:1373
>   #27 0x0811ea97 in recursive_edit_1 () at keyboard.c:989
>   #28 0x0811ec3f in Frecursive_edit () at keyboard.c:1051
>   #29 0x0811cb94 in main (argc=3, argv=0xbfac2fa4) at emacs.c:1862
> 
>   Lisp Backtrace:
>   "display-supports-face-attributes-p" (0xbfac13b4)
>   "face-spec-set-match-display" (0xbfac1534)
>   "face-spec-choose" (0xbfac16a4)
>   "face-spec-set" (0xbfac1824)
>   "custom-declare-face" (0xbfac19a4)
>   "byte-code" (0xbfac1af0)
>   "load" (0xbfac21d0)
>   "load" (0xbfac28b0)
> 
>   (gdb)
>   =================================================
> 
> I could reproduce a similar backtrace with the X11 build of Emacs
> 23.0.50 on Mac OS X by deliberately defining CANNOT_DUMP.  In the
> above backtrace, several values might become unreliable because of
> optimization.  I could get the following output by turning it off.
> 
> 6235	  def_face = FACE_FROM_ID (f, DEFAULT_FACE_ID);
> (gdb) info locals
> supports = 0
> i = 17
> frame = 13636396
> f = (struct frame *) 0xd01328
> def_face = (struct face *) 0x1808b11
> attrs = {25201737, 25201737, 25201737, 25201737, 25201737, 25201425, 
> 25201737 
> <repeats 11 times>}
> (gdb) p *f
> $2 = {
>   size = 1073742869,  next = 0xd01208,  name = 25220731,  icon_name = 
> 25165833,  title = 25165833,  focus_frame = 25165833,  root_window = 
> 13636812,  selected_window = 13636812,  minibuffer_window = 13637180, 
> param_alist = 25165833,  scroll_bars = 25165833,  
> condemned_scroll_bars = 
> 25165833,  menu_bar_items = 25165833,  face_alist = 7789661,  
> menu_bar_vector 
> = 25165833,  buffer_predicate = 25165833,  buffer_list = 7629717, 
> buried_buffer_list = 25165833,  menu_bar_window = 25165833,  
> tool_bar_window 
> = 25165833,  tool_bar_items = 25165833,  desired_tool_bar_string = 
> 25165833, 
> current_tool_bar_string = 25165833,  face_cache = 0x0,  
> menu_bar_items_used = 
> 0,  namebuf = 0x0,  current_pool = 0xd03d08,  desired_pool = 
> 0xd03ce8, 
> desired_matrix = 0x1839408,  current_matrix = 0x1839808, 
> 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,  tool_bar_lines = 0,  n_tool_bar_rows 
> = 0, 
> n_tool_bar_items = 0,  decode_mode_spec_buffer = 0xd03ea8 "", 
> 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,  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 = 0xd01208,  
> output_data = {
>     tty = 0x0,    x = 0x0,    w32 = 0x0,    mac = 0x0,    nothing = 0
>   },  fringe_cols = 0,  left_fringe_width = 0,  right_fringe_width = 
> 0, 
> want_fullscreen = 0,  menu_bar_lines = 0,  external_menu_bar = 0, 
> display_preempted = 0 '\0',  visible = 1 '\001',  iconified = 0 '\0', 
> async_visible = 1 '\001',  async_iconified = 0 '\0',  garbaged = 1 
> '\001', 
> has_minibuffer = 1 '\001',  wants_modeline = 1 '\001',  
> can_have_scroll_bars 
> = 0 '\0',  auto_raise = 0 '\0',  auto_lower = 0 '\0',  no_split = 0 
> '\0', 
> explicit_name = 0 '\0',  window_sizes_changed = 1 '\001',  
> mouse_moved = 0 
> '\0',  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 = 0xd03e68 "",  
> scroll_bottom_vpos = 
> 0,  config_scroll_bar_width = 0,  config_scroll_bar_cols = 0, 
> scroll_bar_actual_width = 0,  cost_calculation_baud_rate = 0,  gamma 
> = 0, 
> extra_line_spacing = 0,  background_pixel = 4294967293,  
> foreground_pixel = 
> 4294967294
> 
> I guess the CANNOT_DUMP situation has not been fully tested after the
> multi-tty merger.
> 
> 				     YAMAMOTO Mitsuharu
> 				mituharu@math.s.chiba-u.ac.jp
> 





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

end of thread, other threads:[~2008-01-31 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <10a6b343c3fbc4d2cd42099b31d644c9@lagorda>
2008-01-31 10:45 ` Emacs 23.0.60 build problem on CANNOT_DUMP platform GNUstep YAMAMOTO Mitsuharu
2008-01-31 10:56   ` YAMAMOTO Mitsuharu
2008-01-31 12:55   ` Chris

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).