gopeed icon indicating copy to clipboard operation
gopeed copied to clipboard

疑似类型溢出

Open SLTECH opened this issue 2 weeks ago • 1 comments

downloading... [■■■□□□□□□□□□□□□□□□□□] 17.8% 1.9MB/s 12.4GB panic: runtime error: index out of range [-9223372036854775808]

goroutine 8 [running]: github.com/GopeedLab/gopeed/pkg/util.ByteFmt(0xc003d26d48?) /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/pkg/util/bytefmt.go:21 +0x231 main.printProgress(0xc0005ba008?, {0x1511953, 0xe}) /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/cmd/gopeed/main.go:77 +0x94 main.main.func1(0xc002cfb9e0) /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/cmd/gopeed/main.go:25 +0x5a github.com/GopeedLab/gopeed/pkg/download.(*Downloader).emit(0xc0001e40d0, {0x1508def, 0x8}, 0xc0000000e0, {0x0?, 0x10ce1e5?, 0xc0024ffc20?}) /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/pkg/download/downloader.go:703 +0xcf github.com/GopeedLab/gopeed/pkg/download.(*Downloader).Setup.func3.1(0xc0000000e0, 0xc0001e40d0) /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/pkg/download/downloader.go:225 +0x425 github.com/GopeedLab/gopeed/pkg/download.(*Downloader).Setup.func3() /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/pkg/download/downloader.go:232 +0x73 created by github.com/GopeedLab/gopeed/pkg/download.(*Downloader).Setup in goroutine 1 /home/user/go/pkg/mod/github.com/!gopeed!lab/[email protected]/pkg/download/downloader.go:192 +0x627

直接crash了。环境:deb13-amd64,命令行版本go直接安装的。看起来像是文件比较大,然后检测到不合理的Peer时,重置进度条的代码有问题崩了。

SLTECH avatar Dec 08 '25 01:12 SLTECH

收到,安排我的copilot修一下

monkeyWie avatar Dec 09 '25 07:12 monkeyWie