[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix a hash lookup problem in xfaces.c
From: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Fix a hash lookup problem in xfaces.c |
Date: |
Sat, 01 Jan 2022 11:59:18 +0200 |
> Date: Sat, 1 Jan 2022 17:24:27 +0800
> From: Zhehao Lin <zh_lin1@outlook.com>
>
> Hello, this patch fixes a problem in the `face_for_font` function in `src/
> xfaces.c` where an `unsigned` instead of an `uintptr_t` was used to
> store the
> computed hash value of the face. If the hash value was too large (>UINT_MAX)
> and truncated, the lookup and storing (the latter uses `uintptr_t` as
> the rest
> of the program does) would happen in different buckets, resulting in
> constant
> cache misses.
Thanks, installed on the emacs-28 branch.