aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Kangas2021-12-15 06:30:41 +0100
committerStefan Kangas2021-12-15 06:30:41 +0100
commit92ed2fe6886a367f00cf04a11d39b4fbf7a44edc (patch)
tree6686eb251678d4d11a4c2ad83982bfcc366326ae /src
parentaab247751663641cc5ba5912cde7fe78e7be4d42 (diff)
parent7078f32b5befd90c1f1956a319f4c847b6961f48 (diff)
downloademacs-92ed2fe6886a367f00cf04a11d39b4fbf7a44edc.tar.gz
emacs-92ed2fe6886a367f00cf04a11d39b4fbf7a44edc.zip
Merge from origin/emacs-28
7078f32b5b Fix crash when dumping charset_table with portable dumper ... a4fcbf46a7 ; etc/NEWS: Move the note about Xref EIEIO change to the p... f88c1d222f Remove maintainer comment from Emacs 28 module snippet. # Conflicts: # etc/NEWS
Diffstat (limited to 'src')
-rw-r--r--src/charset.c2
-rw-r--r--src/charset.h1
-rw-r--r--src/pdumper.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c
index 7cd0fa78f04..670fd48a2d9 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -63,7 +63,7 @@ Lisp_Object Vcharset_hash_table;
63/* Table of struct charset. */ 63/* Table of struct charset. */
64struct charset *charset_table; 64struct charset *charset_table;
65int charset_table_size; 65int charset_table_size;
66static int charset_table_used; 66int charset_table_used;
67 67
68/* Special charsets corresponding to symbols. */ 68/* Special charsets corresponding to symbols. */
69int charset_ascii; 69int charset_ascii;
diff --git a/src/charset.h b/src/charset.h
index 97122d82a65..8c538234d8d 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -249,6 +249,7 @@ extern Lisp_Object Vcharset_hash_table;
249/* Table of struct charset. */ 249/* Table of struct charset. */
250extern struct charset *charset_table; 250extern struct charset *charset_table;
251extern int charset_table_size; 251extern int charset_table_size;
252extern int charset_table_used;
252 253
253#define CHARSET_FROM_ID(id) (charset_table + (id)) 254#define CHARSET_FROM_ID(id) (charset_table + (id))
254 255
diff --git a/src/pdumper.c b/src/pdumper.c
index c758bc89298..8f03684df5a 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3177,7 +3177,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
3177 DUMP_FIELD_COPY (&out, cs, hash_index); 3177 DUMP_FIELD_COPY (&out, cs, hash_index);
3178 DUMP_FIELD_COPY (&out, cs, dimension); 3178 DUMP_FIELD_COPY (&out, cs, dimension);
3179 memcpy (out.code_space, &cs->code_space, sizeof (cs->code_space)); 3179 memcpy (out.code_space, &cs->code_space, sizeof (cs->code_space));
3180 if (cs->code_space_mask) 3180 if (cs_i < charset_table_used && cs->code_space_mask)
3181 dump_field_fixup_later (ctx, &out, cs, &cs->code_space_mask); 3181 dump_field_fixup_later (ctx, &out, cs, &cs->code_space_mask);
3182 DUMP_FIELD_COPY (&out, cs, code_linear_p); 3182 DUMP_FIELD_COPY (&out, cs, code_linear_p);
3183 DUMP_FIELD_COPY (&out, cs, iso_chars_96); 3183 DUMP_FIELD_COPY (&out, cs, iso_chars_96);
@@ -3198,7 +3198,7 @@ dump_charset (struct dump_context *ctx, int cs_i)
3198 memcpy (out.fast_map, &cs->fast_map, sizeof (cs->fast_map)); 3198 memcpy (out.fast_map, &cs->fast_map, sizeof (cs->fast_map));
3199 DUMP_FIELD_COPY (&out, cs, code_offset); 3199 DUMP_FIELD_COPY (&out, cs, code_offset);
3200 dump_off offset = dump_object_finish (ctx, &out, sizeof (out)); 3200 dump_off offset = dump_object_finish (ctx, &out, sizeof (out));
3201 if (cs->code_space_mask) 3201 if (cs_i < charset_table_used && cs->code_space_mask)
3202 dump_remember_cold_op (ctx, COLD_OP_CHARSET, 3202 dump_remember_cold_op (ctx, COLD_OP_CHARSET,
3203 Fcons (dump_off_to_lisp (cs_i), 3203 Fcons (dump_off_to_lisp (cs_i),
3204 dump_off_to_lisp (offset))); 3204 dump_off_to_lisp (offset)));