X rebuild: Don't return nil for empty ΔPPTreeSubSet - that leads to SIGSEGV
--- FAIL: TestΔBTail (0.74s) --- FAIL: TestΔBTail/rebuild/T/T1/T-T2/B0:e-B1:f-B2:g→T1/T-T/B0:g-T2/B1:h-B2:g (0.00s) --- FAIL: TestΔBTail/rebuild/T/T1/T-T2/B0:e-B1:f-B2:g→T1/T-T/B0:g-T2/B1:h-B2:g/_T{};R (0.00s) --- FAIL: TestΔBTail/rebuild/T/T1/T-T2/B0:e-B1:f-B2:g→T1/T-T/B0:g-T2/B1:h-B2:g/_T{};R/_→T1/T-T/B0:g-T/B1:e (0.00s) panic: runtime error: invalid memory address or nil pointer dereference [recovered] panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x632cc1] goroutine 238 [running]: testing.tRunner.func1.2(0x696aa0, 0x893f70) /home/kirr/src/tools/go/go/src/testing/testing.go:1143 +0x332 testing.tRunner.func1(0xc000001b00) /home/kirr/src/tools/go/go/src/testing/testing.go:1146 +0x4b6 panic(0x696aa0, 0x893f70) /home/kirr/src/tools/go/go/src/runtime/panic.go:965 +0x1b9 lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree.PPTreeSubSet.ApplyΔ(0xc00040f9b0, 0x0) /home/kirr/src/neo/src/lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/pptreesubset.go:515 +0x41 lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree.(*ΔTtail).rebuild(0xc00040f830, 0xc, 0xc00040f500, 0xc000142b40, 0x0, 0x0, 0x0) /home/kirr/src/neo/src/lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/δbtail.go:371 +0x145 lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree.(*ΔBtail).rebuildAll(0xc00015dc00, 0x0, 0x0) /home/kirr/src/neo/src/lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/δbtail.go:319 +0x18c lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree.xverifyΔBTail_rebuild_TR(0xc000001b00, 0xc000142b40, 0xc00015dc00, 0xc00006a960, 0xc, 0xc0004863c0, 0xc00040f3b0, 0xc00040f5c0, 0xc00040f650, 0xc00040f740, ...) /home/kirr/src/neo/src/lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/δbtail_test.go:1127 +0x1b6 lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree.xverifyΔBTail_rebuild.func1.1.1(0xc000001b00) /home/kirr/src/neo/src/lab.nexedi.com/nexedi/wendelin.core/wcfs/internal/xbtree/δbtail_test.go:1074 +0xafa testing.tRunner(0xc000001b00, 0xc000555740) /home/kirr/src/tools/go/go/src/testing/testing.go:1193 +0xef created by testing.(*T).Run /home/kirr/src/tools/go/go/src/testing/testing.go:1238 +0x2b3 exit status 2
Showing