Mercurial > hg > xemacs-beta
annotate tests/reproduce-bugs.el @ 4325:948c9b232595
Avoid an error when clicking on Help -> Tutorials
APPROVE COMMIT
This is the patch of 18270.32449.777332.204409@parhasard.net , with slightly
different line numbers.
lisp/ChangeLog addition:
2007-12-11 Aidan Kehoe <kehoea@parhasard.net>
* mule/latin.el :
Specify tutorial-coding-system using dotted cons notation, since
it's not a list. Prevents an error in help-with-tutorial for these
languages.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 11 Dec 2007 21:56:18 +0100 |
parents | f70e56bb52a7 |
children | 2511b50f39c6 |
rev | line source |
---|---|
428 | 1 ;;; reproduce-bugs.el --- reproduce bugs in XEmacs; |
2 | |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1997 Sun Microsystems, Inc. | |
5 | |
6 ;; Keywords: bugs, crash, burn, die, croak, munge | |
7 | |
8 ;; This file is part of XEmacs. | |
9 | |
10 ;; This file is free software; you can redistribute it and/or modify it | |
11 ;; under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; XEmacs is distributed in the hope that it will be useful, but | |
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 ;; General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free | |
22 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
23 ;; 02111-1307, USA. | |
24 | |
25 ;;; Synched up with: Not in FSF. | |
26 | |
27 ;;; Commentary: | |
28 | |
29 ;; Reproduce XEmacs bugs, so that they can get fixed. | |
30 ;; Especially, make XEmacs crash. | |
31 ;; You may need to use a debug version of XEmacs to reproduce some of these. | |
32 | |
33 ;; Several global keybindings are created, each of which exhibits a bug. | |
34 | |
35 ;; For XEmacs maintainers and other masochists. | |
36 | |
37 ;; It's a bad idea to rely on code in this file continuing to work in | |
38 ;; the same way. :-) | |
39 | |
4321
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
40 ;; #### This file should be cleaned up and renamed reproduce-crashes.el. |
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
41 ;; #### Bugs need docstrings. |
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
42 ;; #### Fixed bugs should become regression tests. |
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
43 |
428 | 44 ;;; Code: |
45 | |
46 (defvar bug-hashtable (make-hashtable 10)) | |
47 | |
48 (defmacro defbug (bug-number &rest body) | |
49 `(puthash ,bug-number (lambda () ,@body) bug-hashtable)) | |
50 | |
51 (put 'defbug 'lisp-indent-function 'defun) | |
52 | |
53 (defconst bug-buffer | |
54 (save-excursion | |
55 (set-buffer (get-buffer-create "*Bug*")) | |
56 (erase-buffer) | |
57 (current-buffer))) | |
58 | |
59 ;;;####autoload | |
60 (defun reproduce-bug (number) | |
61 "Reproduce XEmacs bugs, so that they can get fixed. | |
62 Especially, make XEmacs crash. | |
63 See reproduce-bugs.el for bug descriptions and bug numbers. | |
64 A debug version of XEmacs may be needed to reproduce some bugs." | |
65 (interactive "nBug Number: ") | |
66 (funcall (gethash number bug-hashtable))) | |
67 | |
68 ;;; Change this to your preferred key-binding | |
69 | |
4321
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
70 ;; (global-set-key [(control ?Z)] 'reproduce-bug) |
428 | 71 |
72 ;;;; Bugs follow: | |
73 | |
74 ;;; ------------------------------------------------------------------ | |
4322
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
75 ;;; Crash in search due to backward movement |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
76 ;;; Need Mule build with error checking in 21.5.28. |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
77 ;;; Fatal error: assertion failed, |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
78 ;;; file /Users/steve/Software/XEmacs/alioth/xemacs/src/search.c, line 1487, |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
79 ;;; (this_pos) > ((Bytebpos) 1) && this_pos <= ((buf)->text->z + 0) |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
80 ;;; Reported: <475B104F.2070807@barco.com> |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
81 ;;; <87hcixwkh4.fsf@uwakimon.sk.tsukuba.ac.jp> |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
82 ;;; Fixed: <87hcixwkh4.fsf@uwakimon.sk.tsukuba.ac.jp> |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
83 (defbug 10 |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
84 (switch-to-buffer (get-buffer-create "*crash me*")) |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
85 ;; doozy is the keystroke version of the keyboard macro |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
86 ;; "IAI" C-b C-b C-s C-x |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
87 (let ((doozy [;;(control ?x) ?b ?j ?u ?n ?k return |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
88 ?I ?A ?I |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
89 (control ?b) (control ?b) |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
90 (control ?s) (control ?w)])) |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
91 (execute-kbd-macro doozy))) |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
92 |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
93 |
f70e56bb52a7
src/search.c (simple_search): Fix underrun in reverse search.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
4321
diff
changeset
|
94 ;;; ------------------------------------------------------------------ |
428 | 95 ;;; Crash on trace-function |
96 ;;; Fatal error: assertion failed, file src/eval.c, line 1405, abort() | |
97 (defbug 1 | |
98 (trace-function 'record-buffer bug-buffer) | |
99 (pop-to-buffer bug-buffer)) | |
100 | |
101 | |
102 ;;; ------------------------------------------------------------------ | |
103 ;;; Crashes with stack overflow | |
104 ;;; Should give error via barf-if-buffer-read-only | |
105 ;;; Fatal error: assertion failed, file src/eval.c, line 1874, abort() | |
106 ;; This bug has been fixed. -sb | |
107 (defbug 2 | |
108 (switch-to-buffer bug-buffer) | |
109 ;; The following line should contain a number of eight-bit characters | |
110 (insert "²èÌÌËè¤Î°ÜÆ°¤Ï¤Ç¤¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£º£Å٤ϡ¢²èÌ̤ÎÃæ¤Ç¡¢ÆÃÄê¤Î¾ì") | |
111 (setq buffer-read-only t) | |
112 (ignore-errors | |
113 (encode-coding-region (point-min) (point-max) 'euc-japan)) | |
114 (garbage-collect)) | |
115 | |
116 | |
117 ;;; ------------------------------------------------------------------ | |
118 ;;; Crashes in debug version only | |
119 ;;; Fatal error: assertion failed, file src/objects.h, line 149, | |
120 ;;; RECORD_TYPEP (_obj, lrecord_font_instance) || MARKED_RECORD_P (_obj) | |
121 (defbug 3 | |
122 (let (glyph ext) | |
123 (make-face 'adobe-symbol-face) | |
124 (set-face-font | |
125 'adobe-symbol-face | |
126 "-adobe-symbol-medium-r-normal--*-140-*-*-p-*-adobe-fontspecific") | |
127 (setq glyph (make-glyph (list (vector 'string | |
128 :data (char-to-string ?\xD3))))) | |
129 (set-glyph-face glyph 'adobe-symbol-face) | |
130 (setq ext (make-extent 14 18)) | |
131 (set-extent-property ext 'begin-glyph glyph))) | |
132 | |
133 | |
134 ;;; ------------------------------------------------------------------ | |
135 ;;; (maybe?) crash koi8 | |
136 ;;; ACCL: Invalid command (c) | |
137 ;;; With debugging on, crashes as follows: | |
138 ;;; Fatal error: assertion failed, file src/lisp.h, line 1227, INTP (obj) | |
139 (defbug 5 | |
140 ;;(load "cyrillic") | |
141 ;;(load "cyrillic-hooks") | |
142 (princ (decode-coding-string "\xe1" 'koi8))) | |
143 | |
144 | |
145 ;;; ------------------------------------------------------------------ | |
146 ;;; Completely Uninterruptible hang in re-search-backward (Was: java-mode) | |
147 (defbug 6 | |
148 (switch-to-buffer bug-buffer) | |
149 (insert "{ | |
150 public static void main(String[] args) throws java.io.IOException | |
151 { | |
152 } | |
153 } | |
154 ") | |
155 (goto-char (point-min)) | |
156 (search-forward "{" nil nil 2) | |
157 (backward-char) | |
158 (re-search-backward | |
159 "^\\s(\\|\\(^[ \t]*\\(\\(\\(public\\|protected\\|static\\)\\s-+\\)*\\(\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*[][_$.a-zA-Z0-9]+\\|[[a-zA-Z]\\)\\s-*\\)\\s-+\\)\\)?\\(\\([[a-zA-Z][][_$.a-zA-Z0-9]*\\s-+\\)\\s-*\\)?\\([_a-zA-Z][^][ \t:;.,{}()=]*\\|\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)\\)\\s-*\\(([^);{}]*)\\)?\\([] \t]*\\)\\(\\s-*\\<throws\\>\\s-*\\(\\([_$a-zA-Z][_$.a-zA-Z0-9]*\\)[, \t\n\r\f]*\\)+\\)?\\s-*\\)\\s(")) | |
160 | |
161 | |
162 ;;; ------------------------------------------------------------------ | |
163 ;;; regexp crash | |
164 ;; This doesn't crash for me. -sb | |
165 (defbug 7 | |
166 (string-match "\\(\\s-\\|$\\)" "å")) | |
167 | |
168 | |
169 ;;;; ------------------------------------------------------------------- | |
170 ;;;; Bugs below this line have been fixed. | |
171 ;;;; Keep these for regression testing | |
172 ;;;; ------------------------------------------------------------------- | |
173 | |
174 | |
175 ;;; ------------------------------------------------------------------ | |
176 ;;; Infinite recursion crash - Segmentation Fault | |
177 (defbug 4 | |
178 (switch-to-buffer bug-buffer) | |
179 (insert "abcdefg") | |
180 (setq e (make-extent 1 4)) | |
181 (set-extent-property e 'face 'bold) | |
182 (set-extent-property e 'duplicable t) | |
183 (set-extent-property e 'replicating t) | |
184 (insert (buffer-string)) | |
185 (delete-region 8 9)) | |
186 | |
187 (defbug 5 | |
188 (interactive) | |
189 (with-temp-buffer | |
190 (insert "abc") | |
191 (forward-char -1) | |
192 (subst-char-in-region 1 4 ?b ?\344) | |
193 (if (not (= (point) 3)) | |
194 (message "Bug! point should equal 3 but is %d" (point))))) | |
195 | |
196 ;;; crash popup frames FIXED | |
4321
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
197 ;; defbug 8 |
428 | 198 ;;(global-set-key |
199 ;; [(alt meta control f12)] | |
200 ;; (lambda () | |
201 ;; (interactive) | |
202 ;; (let ((f (selected-frame))) | |
203 ;; (make-frame `(popup ,(selected-frame))) | |
204 ;; (make-frame) | |
205 ;; (sit-for 0) | |
206 ;; (delete-frame f) | |
207 ;; (save-buffers-kill-emacs)))) | |
208 | |
209 ;;; crash on delete-frame-hook - FIXED! | |
4321
98e54edf3ab2
Resuscitate reproduce-bugs.el.
Stephen J. Turnbull <stephen@xemacs.org>
parents:
428
diff
changeset
|
210 ;; defbug 9 |
428 | 211 ;;(global-set-key |
212 ;; [(alt meta control f10)] | |
213 ;; (lambda () | |
214 ;; (interactive) | |
215 ;; (setq delete-frame-hook | |
216 ;; (lambda (frame) | |
217 ;; (select-frame frame) | |
218 ;; (kill-buffer (window-buffer (frame-selected-window frame))))))) | |
219 | |
220 ;;; reproduce-bugs.el ends here |