What happens here is trivial long overflow. Despite the bug attracted attention on windows, the same story is on linux. Just wait for a big anough bucket->key . The linux test had %i to check the key value which should be %d all the way.