Subject: bug#33345: 27.0.50; Abort in bidi_cache_iterator_state

From: Eli Zaretskii <[email-masked]>
Date: Mon, 12 Nov 2018 18:08:33 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked]
> Date: Mon, 12 Nov 2018 08:43:34 -0500
> 
> OK, I've managed to do that.  The resulting file is attached.

Thanks.  Doesn't crash here :-(  Tried on MS-Windows and on GNU/Linux.

> But it doesn't look like a bug in bidi, after all:
> - `emacs ~/tmp/foobug.txt`
>   crashes right away
> - `emacs --eval '(setq bidi-display-reordering nil)' ~/tmp/foobug.txt`
>   crashes right away as well!

The last one should have been

  `emacs --eval '(setq-default bidi-display-reordering nil)' ~/tmp/foobug.txt`

> - `emacs -Q ~/tmp/foobug.txt`
>   does not crash
> - `emacs --eval '(garbage-collect)' ~/tmp/foobug.txt`
>   does not crash either!

So we are looking at some strange memory-allocation bug or somesuch?

> Also, when I tried to reproduce it yesterday (in order to produce the
> file), I was on another machine and that one did not crash either.
> The two machines are both running Debian but have various important
> differences: 64bit-vs-32bit and stable-vs-testing.
> 
> So, I wouldn't be surprised at all if noone else manages to reproduce
> the crash.

Can you try Emacs 26 on the same system where Emacs 27 crashes?  And
what about unoptimized build of Emacs 27 -- does it crash as well?

Finally, do you have local changes, or is this stock master HEAD?