• Geoff Simmons's avatar
    Bugfixes, mostly about concurrency, revealed by govarnishstat. · e25ad84c
    Geoff Simmons authored
    The native invocation in Read is locked per Stats object, since
    VSC_Iter is not safe for concurrency with the same vsc and vsm
    handles.
    
    This is not necessary for the descriptions call, since it is only
    invoked once per object at Attach time.
    
    Use sync.Map for the global callback maps, and use 64 bits of
    secure randomness for their keys (using the map length to generate
    new keys was not safe for concurrency).
    
    In rare cases, VSC_Iter may pass NULL as the pointer to a point,
    so just skip it if that happens.
    e25ad84c
stats.h 1.58 KB