Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to decompress valid zstd content #112

Open
klauspost opened this issue Mar 9, 2022 · 1 comment
Open

Unable to decompress valid zstd content #112

klauspost opened this issue Mar 9, 2022 · 1 comment

Comments

@klauspost
Copy link

What version of Go are you using (go version)?

λ go version
go version go1.17.6 windows/amd64

What operating system and processor architecture are you using (go env)?

λ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=d:\temp\gocache
set GOENV=C:\Users\klaus\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=e:\gopath\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=e:\gopath
set GOPRIVATE=
set GOPROXY=https://goproxy.io,goproxy.dev,direct
set GOROOT=c:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.6
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=e:\gopath\src\github.com\DataDog\test\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=d:\temp\wintemp\go-build2972969431=/tmp/go-build -gno-record-gcc-switches

What did you do?

Unpack reproducer: reproducer.zip
Execute go run .

What did you expect to see?

No error.

λ zstd -V
*** zstd command line interface 64-bits v1.5.0, by Yann Collet ***
λ zstd -d cba1cf2f889881b4c91d22895e66836dc20ac1d6.zst
cba1cf2f889881b4c91d22895e66836dc20ac1d6.zst: 872 bytes

What did you see instead?

λ go run .
panic: unexpected EOF

goroutine 1 [running]:
main.main()
        e:/gopath/src/github.com/DataDog/test/main.go:14 +0xa5
exit status 2
@Viq111
Copy link
Collaborator

Viq111 commented Mar 17, 2023

(Doing a bit of cleanup on issues, I haven't forgotten those, just waiting on more guidance from upstream (facebook/zstd#3089) to see whether the DataDog/zstd output (error on extra bytes) or the zstd cli (silenced error) is the correct call here. I'm leaning towards keeping the behavior for now and see whether guidance changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants