Subject: bug#57439: 29.0.50; xterm.c:20623: Emacs fatal error: assertion failed: !must_free_data

From: Gregor Zattler <[email-masked]>
Date: Sat, 27 Aug 2022 14:21:11 +0200

Hi Po,
* Po Lu <[email-masked]> [2022-08-27; 09:52 +08]:
> Gregor Zattler <[email-masked]> writes:
>> for me Emacs crashes if build Emacs master with git HEAD on
>> 9ba6a7c508cbaed5eeedd56e7df633b722bf86b7 with --with-x-toolkit=no :
>>
>> 1. emacs -Q
>> 2. click on "Options" menu
>> 3. crash
>>
>> originally I did this with an -O3 optimized build, then for
>> a hopefully better backtrace I re-build Emacs with -O0
>> (which to build took roughly three times the amount of wall
>> time than building the optimized one).
>>
>> This is the full backtrace:
>
> Thanks.  Should be fixed now.

I confirm this fixes this crash for me.

> (This is really a bug in Xlib, since XGetEventData shouldn't return True
> if the data no longer exists.)

Thank you very much, Gregor