Skip to content

疑似类型溢出 #1199

@SLTECH

Description

@SLTECH

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时,重置进度条的代码有问题崩了。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions