You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
pgzip: Fix an occasional segfault/panic with pgzip (#30)
This change fixes a occasional (5-10 out of 1000 test runs) segfault/panic on
sync.Pool struct access. Basically what happens there is that the original code
assigns a zero-value sync.Pool struct to the existing z.dstPool variable.
In general this kind of assignment is safe only if object is not used anymore /
in parallel by anything else. While is kind of true in a sense that none of the
goroutines are using it, in case of sync.Pool the garbage collector does
special management of the data with weak references and in right weather
conditions corrupts internal state (more precisely the sync.Pool.local might
become nil before reading it but after reading a nonzero sync.Pool.localSize;
leading to invalid memory reference in sync.Pool.Get() ).