Skip to content

Careful: is not safe for concurrent use #14

Description

@Magomogo

Not sure if client code should implement the right locking or this can be done in this package.

fatal error: concurrent map read and map write
goroutine 17031842 [running]:
runtime.throw(0xc0d666, 0x21)
         /usr/local/lib/go1.16.4/src/runtime/panic.go:1117 +0x72 fp=0xc1e27c97f0 sp=0xc1e27c97c0 pc=0x438af2
runtime.mapaccess2(0xb3a2a0, 0xc0295d74d0, 0xc16190f330, 0xc16190f330, 0x0)
         /usr/local/lib/go1.16.4/src/runtime/map.go:469 +0x255 fp=0xc1e27c9830 sp=0xc1e27c97f0 pc=0x411235
reflect.mapaccess(0xb3a2a0, 0xc0295d74d0, 0xc16190f330, 0xc04cbe)
         /usr/local/lib/go1.16.4/src/runtime/map.go:1318 +0x3f fp=0xc1e27c9868 sp=0xc1e27c9830 pc=0x4681ff
reflect.Value.MapIndex(0xb3a2a0, 0xc0295d74d0, 0x15, 0xb111a0, 0xc16190f330, 0x98, 0xb2c140, 0x10f4bd8, 0x99)
         /usr/local/lib/go1.16.4/src/reflect/value.go:1189 +0x16e fp=0xc1e27c98e0 sp=0xc1e27c9868 pc=0x4a6fce
github.com/DmitriyVTitov/size.sizeOf(0xb3a2a0, 0xc0295d74d0, 0x15, 0xc1e27c9a70, 0x18)
         /home/developer/go/pkg/mod/github.com/!dmitriy!v!titov/size@v1.5.0/size.go:119 +0x915 fp=0xc1e27c99d8 sp=0xc1e27c98e0 pc=0xaab455
github.com/DmitriyVTitov/size.Of(0xb3a2a0, 0xc0295d74d0, 0x18)
         /home/developer/go/pkg/mod/github.com/!dmitriy!v!titov/size@v1.5.0/size.go:18 +0x151 fp=0xc1e27c9ab0 sp=0xc1e27c99d8 pc=0xaaaab1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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