15 Jun
2012
15 Jun
'12
9:31 p.m.
In function Cache_client_enqueue variable ClientKey is incremented and checked for negative values after that (in case of overflow). Even though overflow is unlikely, signed integer overflow results in wraparound on most systems and gcc don't seem to optimize away overflow check even with -O3 (it only inlines Cache_client_enqueue in my case) it is better to avoid overflow completely as there are other compilers and compiler versions.