This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Hurd".
The branch, master has been updated
via 8209ae7a5ac541a1783aa4a47a70c30be24ed52e (commit)
from 054275aab67c13cbb3ce08daba1c321ed266cac7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8209ae7a5ac541a1783aa4a47a70c30be24ed52e
Author: Milos Nikic <[email protected]>
Date: Fri Mar 27 22:02:43 2026 -0700
libihash: Prevent multiple evaluation in iteration macros
In HURD_IHASH_ITERATE and HURD_IHASH_ITERATE_ITEMS, the hash table
argument (ht) was evaluated multiple times during loop initialization
and condition checking. If a caller passed an expression with side
effects (e.g., a function call returning a table pointer), it would
be executed repeatedly per loop, leading to performance degradation
or unintended behavior.
Fix this by wrapping the iterators in a dummy outer `for` loop that
evaluates and caches `(ht)` exactly once using `__typeof__`. Token
pasting (##) is used to generate a unique cache variable name based
on the caller's item identifier, safely allowing these macros to be
nested without variable shadowing or naming collisions.
-----------------------------------------------------------------------
Summary of changes:
libihash/ihash.h | 68 +++++++++++++++++++++++++++++++++++---------------------
1 file changed, 43 insertions(+), 25 deletions(-)
hooks/post-receive
--
Hurd