dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.36k stars 488 forks source link

/go/libraries/doltcore/remotestorage/chunk_fetcher.go: fix nil pointer #8077

Closed coffeegoddd closed 1 week ago

coffeegoddd commented 1 week ago

We observe dolthubapi can crash with the following nil pointer error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x29e14d1]

goroutine 399548427 [running]:
github.com/dolthub/dolt/go/libraries/doltcore/remotestorage.fetcherRPCDownloadLocsThread.func3()
    external/com_github_dolthub_dolt_go/libraries/doltcore/remotestorage/chunk_fetcher.go:266 +0xf1
golang.org/x/sync/errgroup.(*Group).Go.func1()
    external/org_golang_x_sync/errgroup/errgroup.go:78 +0x56
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 399548420
    external/org_golang_x_sync/errgroup/errgroup.go:75 +0x96

This pr aims to prevent this.

github-actions[bot] commented 1 week ago

Additional work is required for integration with DoltgreSQL.

coffeegoddd commented 1 week ago

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
999d1b2 ok 5937457
version total_tests
999d1b2 5937457
correctness_percentage
100.0