Page MenuHomeFreeBSD

pctrie: correct iter node after node allocation
ClosedPublic

Authored by dougm on Jun 26 2025, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 4, 2:47 PM
Unknown Object (File)
Mon, Nov 3, 12:35 AM
Unknown Object (File)
Mon, Nov 3, 12:31 AM
Unknown Object (File)
Mon, Nov 3, 12:31 AM
Unknown Object (File)
Mon, Nov 3, 12:30 AM
Unknown Object (File)
Mon, Oct 27, 5:46 AM
Unknown Object (File)
Sat, Oct 25, 7:35 AM
Unknown Object (File)
Oct 18 2025, 1:59 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