ribasushi / DAGger

Other
1 stars 0 forks source link

panic: runtime error: index out of range [-46] #1

Open Gozala opened 2 years ago

Gozala commented 2 years ago

Following panic occurs when running this:

< temp-2.txt go run ./cmd/stream-dagger --ipfs-add-compatible-command='--cid-version=1 --chunker=rabin' --chunkers=rabin_polynomial=17437180132763653_window-size=64_state-target=0_state-mask-bits=8_min-size=18_max-size=262144 --emit-stdout=chunks-jsonl | jq .
panic: runtime error: index out of range [-46]

On a following file temp-2.txt

Gozala commented 2 years ago

I think this is caused by the window size been greater than min size as we have uncovered during our session

https://github.com/ribasushi/DAGger/blob/d04fa83433ea54c693f306720782a66bdd37302c/internal/dagger/chunker/rabin/argparse.go#L70