Subject: bug#76362: 31.0.50; Setting display-line-numbers-type to 'relative crashes Emacs when opening certain files

From: Yiyu Zhou <[email-masked]>
Date: Mon, 17 Feb 2025 19:46:18 -0800

Hi Eli,

Thanks for the patch, it's working great for me now after
1136963b4e81e2b3efd42f3bd609bf968d05831f

Best,
Yiyu

On 2/17/25 08:02, Eli Zaretskii wrote:
>> Cc: [email-masked]
>> Date: Mon, 17 Feb 2025 00:15:31 -0800
>> From: Yiyu Zhou <[email-masked]>
>>
>>
>> This bug is reproducible with two lines in the init.el file:
>>
>> (global-display-line-numbers-mode 1)
>> (setopt display-line-numbers-type 'relative)
>>
>> I discovered this when calling `push-button' in the help-mode buffer
>> trying to view a function definition in its source. I suspect the
>> overflow happens when loading a large file into the buffer, since I
>> could open certain files without crashing Emacs.
>>
>> Here are the details of the backtrace:
>>
>> *** buffer overflow detected ***: terminated
>> Fatal error 6: Aborted
> Thanks, I installed what I think should fix this.  If you still get
> the overflow, please tell more details: what function you had in
> help-buffer and what other steps are needed to reproduce this.