Branch: Tag:

2016-08-18

2016-08-18 12:30:43 by Henrik Grubbström (Grubba) <grubba@grubba.org>

hash_value: Fixed truncation bug on 64-bit architectures.

The hash value was truncated to 32 bits.

Fixes testsuite failures on Solaris/sun4u, and most likely random
failures on other 64-bit architectures when the process has a large
memory footprint.

506:    */   void f_hash_value(INT32 args)   { -  unsigned INT32 h; +  size_t h;       if(!args)    SIMPLE_WRONG_NUM_ARGS_ERROR("hash_value",1);       h = hash_svalue (Pike_sp - args);    pop_n_elems (args); -  +  /* NB: We assume that INT_TYPE has the same width as size_t. */    push_int (h);   }