Closed Lin-1997 closed 11 months ago
Describe the bug
Environment
Additional context the (judge exist - set - get) is not atomic in L63-70. The c.statis may be cleared by the func (c *CacheStatics) log() in L109, and resulting in nil pointer dereference of the item in L70
c.statis
func (c *CacheStatics) log()
item
https://github.com/polarismesh/polaris/blob/5f207e2589d06a188cb3d63b6af8f5ad19b706a9/plugin/statis/base/cachecall.go#L61-L77
https://github.com/polarismesh/polaris/blob/5f207e2589d06a188cb3d63b6af8f5ad19b706a9/plugin/statis/base/cachecall.go#L100-L112
Describe the bug
Environment
Additional context the (judge exist - set - get) is not atomic in L63-70. The
c.statis
may be cleared by thefunc (c *CacheStatics) log()
in L109, and resulting in nil pointer dereference of theitem
in L70https://github.com/polarismesh/polaris/blob/5f207e2589d06a188cb3d63b6af8f5ad19b706a9/plugin/statis/base/cachecall.go#L61-L77
https://github.com/polarismesh/polaris/blob/5f207e2589d06a188cb3d63b6af8f5ad19b706a9/plugin/statis/base/cachecall.go#L100-L112