SIGN IN SIGN UP

Fix reference counting bug in MmapPreciseFile.

This change fixes a bug in the reference counting logic of MmapPreciseFile
that could lead to an undercount of references. Previously,
`MmapPreciseFile.IncRef` used `refsSet.Insert`, which could prematurely merge
a newly inserted segment with an adjacent existing segment. This caused the
loop cursor to advance too far, skipping the reference increment for the
existing segment.

`InsertWithoutMerging` ensures the loop correctly processes the inserted
segment and properly increments adjacent segments on subsequent iterations.

PiperOrigin-RevId: 964311788
N
Nayana Bidari committed
8e9789caa36e59998929e00a5b274d29ab4790a9
Parent: 97346d1
Committed by gVisor bot <gvisor-bot@google.com> on 8/13/2026, 10:03:08 PM