XEmacs builds, but can't pass the test suite.
Try building a debug build on Unix, and running `make check'. You get
a crash as below.
The problem seems to be that real_gutter_size[TOP_GUTTER] is assumed
to be either Qnil or an integer, but in fact it gets the value
Qunbound. (I don't know wherefrom - because it's a specifier?).
I tried the following obvious patch, which made the crash go away.
Index: gutter.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/gutter.h,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 gutter.h
--- gutter.h 1999/12/23 02:50:45 1.1.2.5
+++ gutter.h 2000/01/15 10:05:48
@@ -63,11 +63,11 @@
void reset_gutter_display_lines (struct frame* f);
#define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \
-(NILP ((w)->gutter_border_width[pos]) ? 0 : XINT ((w)->gutter_border_width[pos]))
+(!INTP ((w)->gutter_border_width[pos]) ? 0 : XINT ((w)->gutter_border_width[pos]))
#define WINDOW_GUTTER_SIZE(w, pos) \
-(NILP ((w)->gutter_size[pos]) ? 0 : XINT ((w)->gutter_size[pos]))
+(!INTP ((w)->gutter_size[pos]) ? 0 : XINT ((w)->gutter_size[pos]))
#define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \
-(NILP ((w)->real_gutter_size[pos]) ? 0 : XINT ((w)->real_gutter_size[pos]))
+(!INTP ((w)->real_gutter_size[pos]) ? 0 : XINT ((w)->real_gutter_size[pos]))
#define WINDOW_GUTTER_VISIBLE(w, pos) \
((w)->gutter_visible_p[pos])
#define WINDOW_GUTTER(w, pos) \
As usual, I have no idea what's going on here. Andy, please help.
Figure out why the values Qnil and Qunbound are both coming into play
here, and whether my patch is in any way the right thing to do.
Note that all of this is happening with -batch.
Martin
Debugging session follows.
(martin@lasker) /xemacs/build/ud9/src $ dm.
GNU gdb 4.17.0.11 with Linux support
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...check-xemacs
(gdb) Loading big-menubar...
Loading comint... (file comint.el is newer)
Loading blink-paren...
Testing /xemacs/build/ud9/tests/automated/base64-tests.el...
base64-tests.el: 1232 of 1232 (100%) tests successful.Fatal error: assertion failed, file
/xemacs/ws/dev/src/lisp.h, line 1292, INTP (obj)
Program received signal SIGABRT, Aborted.
0x402cd111 in __kill ()
(gdb) where 10
#0 0x402cd111 in __kill ()
#1 0x402ccd66 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x402ce447 in abort () at ../sysdeps/generic/abort.c:88
#3 0x808f948 in assert_failed (file=0x8210482 "/xemacs/ws/dev/src/lisp.h",
line=1292, expr=0x8210643 "INTP (obj)") at /xemacs/ws/dev/src/emacs.c:2833
#4 0x80b7198 in XINT (obj={...}) at /xemacs/ws/dev/src/lisp.h:1292
#5 0x81cdf2f in window_top_gutter_height (w=0x82e15f8) at
/xemacs/ws/dev/src/window.c:1016
#6 0x81d4199 in window_pixel_height_to_char_height (w=0x82e15f8, pixel_height=9,
include_gutters_p=0) at /xemacs/ws/dev/src/window.c:3584
#7 0x81d42ed in window_char_height (w=0x82e15f8, include_gutters_p=0) at
/xemacs/ws/dev/src/window.c:3636
#8 0x81ceb8d in Fwindow_height (window={...}) at /xemacs/ws/dev/src/window.c:1300
#9 0x8097387 in Ffuncall (nargs=2, args=0xbfffaf60) at /xemacs/ws/dev/src/eval.c:3175
(More stack frames follow...)
(gdb) lbt
window-height(#<window on "*scratch*" 0x309>)
# bind (window old-frame target-frame explicit-frame)
byte-code("..." [nil explicit-frame target-frame old-frame window
last-nonminibuf-frame selected-frame get-buffer buffer bufferp wrong-type-argument
pre-display-buffer-function not-this-window-p override-frame display-buffer-function throw
done buffer-dedicated-frame dedi frame-live-p window-buffer selected-window
display-buffer-1 buffer-name same-window-buffer-names assoc switch-to-buffer
same-window-regexps tem car string-match pop-up-frames 0 get-buffer-window
special-display-function special-display-buffer-names special-display-regexps
frame-selected-window pop-up-frame-function set-window-buffer pop-up-windows
frame-property minibuffer only window-dedicated-p frame-root-window split-height-threshold
window-min-height split-width-threshold window-min-width ...] 7)
# (catch done ...)
# bind (override-frame not-this-window-p buffer)
display-buffer(#<buffer "*Test-Log*">)
# bind (pre-display-buffer-function buffer)
show-temp-buffer-in-current-frame(#<buffer "*Test-Log*">)
# bind (standard-output)
(with-output-to-temp-buffer "*Test-Log*" (defmacro Assert (assertion)
(backquote ...)) (defmacro Check-Error (expected-error &rest body) (let ... ...))
(defmacro Check-Error-Message (expected-error expected-error-regexp &rest body) (let
... ...)) (defmacro Check-Message (expected-message-regexp &rest body) (let ... ...))
(defmacro Ignore-Ebola (&rest body) (backquote ...)) (defun Int-to-Marker (pos)
(save-excursion ... ...)) (princ "Testing Interpreted Lisp\n\n") (condition-case
error-info (funcall ...) (error ... ... ... ...)) (princ "\nTesting Compiled
Lisp\n\n") (let (code) (condition-case error-info ... ...) (condition-case error-info
... ...)) (princ "\nSUMMARY:\n") (princ (format " %5d passes\n"
passes)) (princ (format " %5d assertion failures\n" assertion-failures)) (princ
(format " %5d errors that should have been generated, but weren't\n"
no-error-failures)) (princ (format " %5d wrong-error failures\n"
wrong-error-failures)) (princ (format " %5d missing-message failures\n"
missing-message-failures)) (princ (format " %5d other failures\n"
other-failures)) (let* (... ... ...) (message "%s" summary-msg)) (when
unexpected-test-suite-failure (message "Test suite execution failed
unexpectedly.")) (fmakunbound (quote Assert)) (fmakunbound (quote Check-Error))
(fmakunbound (quote Ignore-Ebola)) (fmakunbound (quote Int-to-Marker)))
)
# bind (debug-on-error unexpected-test-suite-failure trick-optimizer other-failures
missing-message-failures wrong-error-failures no-error-failures assertion-failures
passes)
(let ((passes 0) (assertion-failures 0) (no-error-failures 0) (wrong-error-failures 0)
(missing-message-failures 0) (other-failures 0) (trick-optimizer nil)
(unexpected-test-suite-failure nil) (debug-on-error t)) (with-output-to-temp-buffer
"*Test-Log*" (defmacro Assert ... ...) (defmacro Check-Error ... ...) (defmacro
Check-Error-Message ... ...) (defmacro Check-Message ... ...) (defmacro Ignore-Ebola ...
...) (defun Int-to-Marker ... ...) (princ "Testing Interpreted Lisp\n\n")
(condition-case error-info ... ...) (princ "\nTesting Compiled Lisp\n\n") (let
... ... ...) (princ "\nSUMMARY:\n") (princ ...) (princ ...) (princ ...) (princ
...) (princ ...) (princ ...) (let* ... ...) (when unexpected-test-suite-failure ...)
(fmakunbound ...) (fmakunbound ...) (fmakunbound ...) (fmakunbound ...)))
)
# bind (filename inbuffer)
test-harness-from-buffer(#<buffer " *Test Input*">
"/xemacs/build/ud9/tests/automated/base64-tests.el")
# bind (input-buffer test-harness-current-file)
(let ((test-harness-current-file filename) input-buffer) (save-excursion (setq
input-buffer ...) (set-buffer input-buffer) (erase-buffer) (insert-file-contents filename)
(let ... ... ...)) (test-harness-from-buffer input-buffer filename) (kill-buffer
input-buffer))
)
# bind (filename)
test-emacs-test-file("/xemacs/build/ud9/tests/automated/base64-tests.el")
(progn (test-emacs-test-file file) t)
)
# (condition-case ... . ((error (princ ">>Error occurred processing ")
(princ file) (princ ": ") (display-error error-info nil) (terpri) nil)))
(condition-case error-info (progn (test-emacs-test-file file) t) (error (princ
">>Error occurred processing ") (princ file) (princ ": ")
(display-error error-info nil) (terpri) nil))
)
# bind (file)
batch-test-emacs-1("/xemacs/build/ud9/tests/automated/base64-tests.el")
(or (batch-test-emacs-1 file-in-dir) (setq error t))
)
(if (and (string-match emacs-lisp-file-regexp file-in-dir) (not ...)) (or
(batch-test-emacs-1 file-in-dir) (setq error t)))
)
(when (and (string-match emacs-lisp-file-regexp file-in-dir) (not ...)) (or
(batch-test-emacs-1 file-in-dir) (setq error t)))
)
(while --dolist-temp--15901 (setq file-in-dir (car --dolist-temp--15901)) (when (and ...
...) (or ... ...)) (setq --dolist-temp--15901 (cdr --dolist-temp--15901)))
)
# bind (file-in-dir --dolist-temp--15901)
(let ((--dolist-temp--15901 ...) file-in-dir) (while --dolist-temp--15901 (setq
file-in-dir ...) (when ... ...) (setq --dolist-temp--15901 ...)) nil)
)
# (catch --cl-block-nil-- ...)
(catch (quote --cl-block-nil--) (let (... file-in-dir) (while --dolist-temp--15901 ...
... ...) nil))
)
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
)
(block nil (let (... file-in-dir) (while --dolist-temp--15901 ... ... ...) nil))
)
(dolist (file-in-dir (directory-files file t)) (when (and ... ...) (or ... ...)))
)
(if (file-directory-p file) (dolist (file-in-dir ...) (when ... ...)) (or
(batch-test-emacs-1 file) (setq error t)))
)
(while --dolist-temp--15900 (setq file (car --dolist-temp--15900)) (if (file-directory-p
file) (dolist ... ...) (or ... ...)) (setq --dolist-temp--15900 (cdr
--dolist-temp--15900)))
)
# bind (file --dolist-temp--15900)
(let ((--dolist-temp--15900 command-line-args-left) file) (while --dolist-temp--15900
(setq file ...) (if ... ... ...) (setq --dolist-temp--15900 ...)) nil)
)
# (catch --cl-block-nil-- ...)
(catch (quote --cl-block-nil--) (let (... file) (while --dolist-temp--15900 ... ... ...)
nil))
)
(cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
)
(block nil (let (... file) (while --dolist-temp--15900 ... ... ...) nil))
)
(dolist (file command-line-args-left) (if (file-directory-p file) (dolist ... ...) (or
... ...)))
)
# bind (error)
(let ((error nil)) (dolist (file command-line-args-left) (if ... ... ...)) (message
"Done") (kill-emacs (if error 1 0)))
)
batch-test-emacs()
# bind (arg)
command-line-do-funcall("-f")
# bind (dir file-count line end-of-options first-file-buffer file-p arg tem)
command-line-1()
# bind (command-line-args-left)
command-line()
# (unwind-protect ...)
normal-top-level()
# (condition-case ... . error)
# (catch top-level ...)
(gdb) where 10
#0 0x402cd111 in __kill ()
#1 0x402ccd66 in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2 0x402ce447 in abort () at ../sysdeps/generic/abort.c:88
#3 0x808f948 in assert_failed (file=0x8210482 "/xemacs/ws/dev/src/lisp.h",
line=1292, expr=0x8210643 "INTP (obj)") at /xemacs/ws/dev/src/emacs.c:2833
#4 0x80b7198 in XINT (obj={...}) at /xemacs/ws/dev/src/lisp.h:1292
#5 0x81cdf2f in window_top_gutter_height (w=0x82e15f8) at
/xemacs/ws/dev/src/window.c:1016
#6 0x81d4199 in window_pixel_height_to_char_height (w=0x82e15f8, pixel_height=9,
include_gutters_p=0) at /xemacs/ws/dev/src/window.c:3584
#7 0x81d42ed in window_char_height (w=0x82e15f8, include_gutters_p=0) at
/xemacs/ws/dev/src/window.c:3636
#8 0x81ceb8d in Fwindow_height (window={...}) at /xemacs/ws/dev/src/window.c:1300
#9 0x8097387 in Ffuncall (nargs=2, args=0xbfffaf60) at /xemacs/ws/dev/src/eval.c:3175
(More stack frames follow...)
(gdb) f 5
#5 0x81cdf2f in window_top_gutter_height (w=0x82e15f8) at
/xemacs/ws/dev/src/window.c:1016
1016 int gutter = WINDOW_REAL_TOP_GUTTER_BOUNDS (w);
(gdb) p *w
$1 = {header = {lheader = {type = 26, mark = 0, c_readonly = 0, lisp_readonly = 0}, next =
0x82e14c8, uid = 777, free = 0}, frame = {...}, mini_p = {...}, next = {...}, prev =
{...}, hchild = {...}, vchild = {...}, parent = {...}, pixel_left = 0, pixel_top = 0,
pixel_height = 9, pixel_width = 10, buffer = {...}, start = {{...}, {...}, {...}}, pointm
= {{...}, {...}, {...}}, sb_point = {...}, hscroll = 0, modeline_hscroll = 0, top_yoffset
= 0, left_xoffset = 0, use_time = {...}, last_modified = {{...}, {...}, {...}}, last_point
= {{...}, {...}, {...}}, last_start = {{...}, {...}, {...}}, last_facechange = {{...},
{...}, {...}}, face_cachels = 0x0, glyph_cachels = 0x0, subwindow_instance_cache = {...},
line_start_cache = 0x0, line_cache_last_updated = {...}, line_cache_validation_override =
0, max_line_len = 0, last_point_x = {0, 0, 0}, last_point_y = {0, 0, 0}, window_end_pos =
{0, 0, 0}, redisplay_end_trigger = {...}, last_redisplay_pos = 0, dedicated = {...},
display_table = {...}, modeline_shadow_thickness = {...}, has_modeline_p = {...},
vertical_divider_shadow_thickness = {...}, vertical_divider_line_width = {...},
vertical_divider_spacing = {...}, vertical_divider_always_visible_p = {...},
scrollbar_width = {...}, scrollbar_height = {...}, horizontal_scrollbar_visible_p = {...},
vertical_scrollbar_visible_p = {...}, scrollbar_on_left_p = {...}, scrollbar_on_top_p =
{...}, scrollbar_pointer = {...}, toolbar = {{...}, {...}, {...}, {...}}, toolbar_size =
{{...}, {...}, {...}, {...}}, toolbar_border_width = {{...}, {...}, {...}, {...}},
toolbar_visible_p = {{...}, {...}, {...}, {...}}, toolbar_buttons_captioned_p = {...},
default_toolbar = {...}, default_toolbar_width = {...}, default_toolbar_height = {...},
default_toolbar_visible_p = {...}, default_toolbar_border_width = {...}, gutter = {{...},
{...}, {...}, {...}}, gutter_size = {{...}, {...}, {...}, {...}}, real_gutter_size =
{{...}, {...}, {...}, {...}}, gutter_border_width = {{...}, {...}, {...}, {...}},
gutter_visible_p = {{...}, {...}, {...}, {...}}, de
fault_gutter = {...}, default_gutter_width = {...}, default_gutter_height = {...},
default_gutter_visible_p = {...}, default_gutter_border_width = {...}, left_margin_width =
{...}, right_margin_width = {...}, minimum_line_ascent = {...}, minimum_line_descent =
{...}, use_left_overflow = {...}, use_right_overflow = {...}, menubar_visible_p = {...},
text_cursor_visible_p = {...}, config_mark = 0, dead = 0, force_start = 0, redo_modeline =
0, start_at_line_beg = 1, windows_changed = 1, shadow_thickness_changed = 1,
need_vertical_divider_p = 0, need_vertical_divider_valid_p = 0}
(gdb) pobj w->real_gutter_size[TOP_GUTTER]
$7 = (struct symbol_value_forward *) 0x825ea0c
$8 = {magic = {lcheader = {lheader = {type = 1, mark = 0, c_readonly = 0, lisp_readonly =
0}, next = 0x0, uid = 69, free = 0}, type = SYMVAL_UNBOUND_MARKER}, magicfun = 0x1}