Subject: bug#18152: 24.3.92; Crash in emacs 24 while reverting a buffer

From: Eli Zaretskii <[email-masked]>
Date: Wed, 30 Jul 2014 20:30:46 +0300

> Date: Wed, 30 Jul 2014 18:03:02 +0100
> From: Andy Moreton <[email-masked]>
> 
> Running emacs 24 built from r117416 on Win7 64bit using Mingw toolchain.
> 
> After several hours of working normally, I hit <f5> (which I have bound
> to revert-buffer) in a c-mode buffer. Emacs crashed, and running gdb
> showed the follwing backtrace:
> [...]
> #1  0x011ff2fc in emacs_abort () at ../../src/w32fns.c:8478
>          button = 0x6
> #2  0x010f21d6 in terminate_due_to_signal (sig=0x16, backtrace_limit=0x7fffffff) at ../../src/emacs.c:378
> No locals.
> #3  0x01164fe0 in die (msg=0x14a0b9a "same_at_start == GPT_BYTE", file=0x14a00a7 "../../src/fileio.c", line=0xfcb) at ../../src/alloc.c:6833
> No locals.
> #4  0x0113799a in Finsert_file_contents (filename=0x6364c71, visit=0x37a7842, beg=0x37a7822, end=0x37a7822, replace=0x37a7842) at ../../src/fileio.c:4043
>          bufpos = 0x38f
>          this = 0x0
>          this_count = 0x13
>          same_at_start = 0x380
>          same_at_end = 0x390
>          decoded = 0xb3414b0 "/", '*' <repeats 74 times>, "\\\n*//*! \\file wt_mem.c - WT (Windows Tools) memory allocation helper routines\n** <L5_PRIVATE L5_SOURCE>\n** \\author  al\n**  \\b"...

Unless you can reproduce this at will, it's too bad that you didn't
record the value of GPT_BYTE, whose difference from same_at_start is
the immediate reason for the assertion violation on line 4043 of
fileio.c.