emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Final" version of tty child frames


From: Paul Eggert
Subject: Re: "Final" version of tty child frames
Date: Tue, 22 Oct 2024 12:19:44 -0700
User-agent: Mozilla Thunderbird

On 2024-10-22 07:40, Eli Zaretskii wrote:
Paul, should we make line_hash_code return 'size_t' instead (and
change the data type of the variables in 'scrolling' accordingly)?  Or
maybe we should simply mask off high bits of the face_cache's pointer,
leaving only the low 32 bits, before adding it to the hash?

Either approach should be correct. The attached (untested and uninstalled) patch does the equivalent of the latter, which is simpler. I don't know whether the more-complicated one would perform better.

This patch also fixes a glitch in that one should cast pointers to uintptr_t or to intptr_t, not to ptrdiff_t. The difference can matter on unusual platforms like CheriBSD where uintptr_t is wider than ptrdiff_t.

Attachment: 0001-Fix-UB-in-line_hash_code.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]