Yoshiki Hayashi <yoshiki(a)xemacs.org> writes:
> If I start up XEmacs and invoke W3 ('M-x w3'), XEmacs
crashes almost
> immediately. Gnus also invokes w3 when it encounters an HTML message,
> which produces the exact same crashing behavior. It doesn't seem to
> matter whether I do any other activities before invoking w3, with one
> exception. If I specify w3 on the xemacs command-line ('-f w3'), it
> starts up and prints the error
> "No more character sets for this dimension: 1"
> and otherwise works okay. If I then invoke w3 again ('M-x w3'), the
> same crash behavior occurs.
The problem is, when pdump is enabled,
next_allocated_1_byte_leading_byte and
next_allocated_2_byte_leading_byte are not initialized
correctly.
I finally looked pdump code. I think this is the right
solution.
Olivier, please review this patch.
2000-05-01 Yoshiki Hayashi <yoshiki(a)xmacs.org>
* mule-charset.h (struct charset_lookup): Add
next_allocated_1_byte_leading_byte and
next_allocated_2_byte_leading_byte.
* mule-charset.c: Move above two variables so that those values
will be dumped.
Index: mule-charset.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/mule-charset.c,v
retrieving revision 1.12.2.28
diff -u -r1.12.2.28 mule-charset.c
--- mule-charset.c 2000/02/21 23:06:58 1.12.2.28
+++ mule-charset.c 2000/05/01 09:06:55
@@ -150,9 +150,6 @@
Lisp_Object Vcharset_hash_table;
-static Bufbyte next_allocated_1_byte_leading_byte;
-static Bufbyte next_allocated_2_byte_leading_byte;
-
/* Composite characters are characters constructed by overstriking two
or more regular characters.
@@ -529,17 +526,17 @@
if (dimension == 1)
{
- if (next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1)
+ if (chlook->next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1)
lb = 0;
else
- lb = next_allocated_1_byte_leading_byte++;
+ lb = chlook->next_allocated_1_byte_leading_byte++;
}
else
{
- if (next_allocated_2_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_2)
+ if (chlook->next_allocated_2_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_2)
lb = 0;
else
- lb = next_allocated_2_byte_leading_byte++;
+ lb = chlook->next_allocated_2_byte_leading_byte++;
}
if (!lb)
@@ -1348,8 +1345,8 @@
for (k = 0; k < countof (chlook->charset_by_attributes[0][0]); k++)
chlook->charset_by_attributes[i][j][k] = Qnil;
- next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
- next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
+ chlook->next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
+ chlook->next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
}
void
Index: mule-charset.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/mule-charset.h,v
retrieving revision 1.7.2.13
diff -u -r1.7.2.13 mule-charset.h
--- mule-charset.h 2000/02/26 11:39:48 1.7.2.13
+++ mule-charset.h 2000/05/01 09:06:57
@@ -557,6 +557,8 @@
/* Table of charsets indexed by type/final-byte/direction. */
Lisp_Object charset_by_attributes[4][128][2];
+ Bufbyte next_allocated_1_byte_leading_byte;
+ Bufbyte next_allocated_2_byte_leading_byte;
};
extern struct charset_lookup *chlook;
--
Yoshiki Hayashi