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)
Wed, Sep 16, 12:01 PM
Unknown Object (File)
Wed, Sep 16, 11:54 AM
Unknown Object (File)
Sun, Sep 6, 8:39 AM
Unknown Object (File)
Sat, Sep 5, 6:05 AM
Unknown Object (File)
Fri, Aug 28, 2:46 PM
Unknown Object (File)
Aug 17 2026, 7:31 AM
Unknown Object (File)
Aug 12 2026, 6:24 AM
Unknown Object (File)
Aug 8 2026, 10:52 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