Skip to content

s2.Encode a large value panic #778

@mYmNeo

Description

@mYmNeo

I'd wrote a unit test with s2.Encode, found that a panic on such scenario as following

v := make([]byte, math.MaxInt32)
if s2.MaxEncodedLen(len(v)) != -1 {
	s2.Encode(nil, v)
}

the stack is
runtime: g 6: unexpected return pc for github.com/klauspost/compress/s2.encodeBlockAsm called from 0x5000500050005

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions