Skip to content

Data races due to append calls in pkg/trace/info/stats.go #11565

Open
@deadok22

Description

There are data races due to these append() calls in pkg/trace/info/stats.go.

The append(tags, ...) calls linked to above can modify the array backing the tags slice, if the array's capacity is larger than the slice's size, while the code backing metrics.Count reads the same array. Note that the code backing metrics.Count may access the len(tags)-th array element while it's being written to by another goroutine. This can lead to all sorts of trouble (reading arbitrary memory, segfaults, etc.).

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions