* Re: master 350918e7be: Adjust x_display_set_last_user_time for Xlib sign-extension
[not found] ` <20221122125819.904D2C0E4B5@vcs2.savannah.gnu.org>
@ 2022-11-22 13:13 ` Robert Pluim
2022-11-22 13:16 ` Po Lu
0 siblings, 1 reply; 2+ messages in thread
From: Robert Pluim @ 2022-11-22 13:13 UTC (permalink / raw)
To: emacs-devel; +Cc: Po Lu
>>>>> On Tue, 22 Nov 2022 07:58:19 -0500 (EST), Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> said:
Po Lu> + /* Time can be sign extended if retrieved from a client message.
Po Lu> + Make sure it is always 32 bits, or systems with 64-bit longs
Po Lu> + will crash after 24 days of X server uptime. (bug#59480) */
Po Lu> + time &= X_ULONG_MAX;
Po Lu> +
Po Lu> #ifdef ENABLE_CHECKING
Po Lu> eassert (time <= X_ULONG_MAX);
Po Lu> #endif
You could even remove the `eassert' now, but itʼs a minor thing.
Robert
--
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: master 350918e7be: Adjust x_display_set_last_user_time for Xlib sign-extension
2022-11-22 13:13 ` master 350918e7be: Adjust x_display_set_last_user_time for Xlib sign-extension Robert Pluim
@ 2022-11-22 13:16 ` Po Lu
0 siblings, 0 replies; 2+ messages in thread
From: Po Lu @ 2022-11-22 13:16 UTC (permalink / raw)
To: Robert Pluim; +Cc: emacs-devel
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Tue, 22 Nov 2022 07:58:19 -0500 (EST), Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> said:
> Po Lu> + /* Time can be sign extended if retrieved from a client message.
> Po Lu> + Make sure it is always 32 bits, or systems with 64-bit longs
> Po Lu> + will crash after 24 days of X server uptime. (bug#59480) */
> Po Lu> + time &= X_ULONG_MAX;
> Po Lu> +
> Po Lu> #ifdef ENABLE_CHECKING
> Po Lu> eassert (time <= X_ULONG_MAX);
> Po Lu> #endif
>
> You could even remove the `eassert' now, but itʼs a minor thing.
>
> Robert
Right, I missed that.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-22 13:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <166912189923.20568.14093477497390803497@vcs2.savannah.gnu.org>
[not found] ` <20221122125819.904D2C0E4B5@vcs2.savannah.gnu.org>
2022-11-22 13:13 ` master 350918e7be: Adjust x_display_set_last_user_time for Xlib sign-extension Robert Pluim
2022-11-22 13:16 ` Po Lu
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).