Subject: Re: bug#13664: 24.3.50; assertion failed: ZV != ZV_BYTE || charpos == bytepos" alloc.c:6556

From: Eli Zaretskii <[email-masked]>
Date: Sat, 09 Feb 2013 20:45:38 +0200

> Date: Sat, 9 Feb 2013 17:54:21 +0000
> From: Andy Moreton <[email-masked]>
> 
> 
> Start a freshly bootstrapped emacs with my normal init file, including
> el-get. Something in el-get package loading triggers the assert
> (without el-get and the other packages it loads, emacs starts normally).
> The assertion failure is completely reproducible.
> 
> gdb backtrace:
> 
> Thread 1 (Thread 24412.0x59f4):
> #0  0x7c90120f in ntdll!DbgUiConnectToDbg () from 
> C:\WINDOWS\system32\ntdll.dll
> #1  0x01157790 in emacs_abort () at w32fns.c:7753
> #2  0x0100145d in terminate_due_to_signal (sig=0x16, 
> backtrace_limit=0x7fffffff) at emacs.c:343
> #3  0x01021e5d in die (msg=0x15fca94 "assertion failed: ZV != ZV_BYTE || charpos == bytepos", file=0x15fb860 "intervals.c", line=0x766) at alloc.c:6556
> #4  0x012e53af in set_point_both (charpos=0xa, bytepos=0xb) at intervals.c:1894

Some snafu with characters vs byte counts in a unibyte buffer.  It dies
here:

  /* In a single-byte buffer, the two positions must be equal.  */
  eassert (ZV != ZV_BYTE || charpos == bytepos);

If you revert the changes to syntax.c in revision 111693, does the
problem go away?