Page MenuHomeFreeBSD

pctrie: correct iter node after node allocation
ClosedPublic

Authored by dougm on Jun 26 2025, 6:48 AM.
Tags
None
Referenced Files
F159780919: D51059.id157719.diff
Thu, Jun 18, 4:32 AM
F159780845: D51059.id157719.diff
Thu, Jun 18, 4:30 AM
Unknown Object (File)
Mon, Jun 15, 6:49 PM
Unknown Object (File)
Thu, May 21, 3:12 PM
Unknown Object (File)
Wed, May 20, 6:57 AM
Unknown Object (File)
May 19 2026, 3:30 AM
Unknown Object (File)
May 17 2026, 10:38 AM
Unknown Object (File)
May 15 2026, 4:21 AM
Subscribers

Details

Summary

Usually, a pctrie_iter operation leaves the iterator node pointing to the last pctrie_node on the path to the found, or inserted, or removed leaf. However, that is not the case when inserting a leaf causes the allocation of a new pctrie node. In that case, the iterator node is left pointing to the parent of the allocated node, and not to the newly allocated node itself, the parent of the just-inserted leaf. Correct this anomaly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable