Subject: bug#31829: 27.0.50;

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 Jun 2018 21:17:15 +0300

> Date: Thu, 14 Jun 2018 21:10:59 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> Note that in find-coding-systems-region we have an invalid character
> code, larger than 0x3fffff:
> 
>   (gdb) up
>   #1  0x011f5624 in die (
>       msg=0x169e0b4 <DEFAULT_REHASH_SIZE+540> "0 <= idx && idx < (1 << CHARTAB_SIZE_BITS_0)", file=0x169daa8 <Qzlib+8> "lisp.h", line=3318) at alloc.c:7410
>   7410      terminate_due_to_signal (SIGABRT, INT_MAX);
>   (gdb)
>   #2  0x011460ef in set_char_table_contents (table=XIL(0xa000000001c98020),
>       idx=178, val=XIL(0xa00000000790d3f8)) at lisp.h:3318
>   3318      eassert (0 <= idx && idx < (1 << CHARTAB_SIZE_BITS_0));
>   (gdb)
>   #3  0x01116dcc in char_table_set (table=XIL(0xa000000001c98020), c=11672154,
>       val=XIL(0xebd0)) at chartab.c:436
>   436               set_char_table_contents (table, i, sub);
>   (gdb)
>   #4  0x010fb986 in Ffind_coding_systems_region_internal (start=make_number(1),
>       end=make_number(50106), exclude=XIL(0)) at coding.c:9086
>   9086              char_table_set (work_table, c, Qt);
>   (gdb) p/x c
>   $1 = 0xb21a5a  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<

And I see the same problem in Emacs 26.1 and in its pretests.