Eliminated null tag reachability in dbg scripts

This was throwing off tree rendering in dbglfs.py, we attempt to lookup
the null tag because we just want to first tag in the tree to stitch
things together.

Null tag reachability is tricky! You only notice if the tree happens to
create a hole, which isn't that common. I think all lookup
implementations should have this max(tag, 1) pattern from now on to
avoid this.

Note that most dbg scripts wouldn't run into this because we usually use
the traversal tag+1 pattern. Still, the inconsistency in impl between
the dbg scripts and lfs.c is bad.
This commit is contained in:
Christopher Haster
2024-03-20 13:31:16 -05:00
parent 3eb4ccdde7
commit 62de865103
5 changed files with 5 additions and 0 deletions

View File

@@ -715,6 +715,7 @@ class Rbyd:
if not self:
return True, 0, -1, 0, 0, 0, b'', []
tag = max(tag, 0x1)
lower = 0
upper = self.weight
path = []