http://bugzilla.mindrot.org/show_bug.cgi?id=775 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |WORKSFORME ------- Additional Comments From djm at mindrot.org 2004-12-20 10:59 ------- 10 months, no reply == closed bug ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
http://bugzilla.mindrot.org/show_bug.cgi?id=775 ------- Additional Comments From mdb at juniper.net 2004-12-20 11:55 ------- #define HASH_ENTRYSIZE (sizeof(u_int16_t)) is probably to UNICOS 9 doing something like this: % cat h.c #include <stdio.h> typedef unsigned short u_int16_t; u_int16_t h[40]; int main (int argc, char *argv[]) { printf ("sizeof(u_int16_t) = %d\n", sizeof(u_int16_t)); printf ("sizeof(h) = %d\n", sizeof(h)); return 0; } % cc -o h h.c % ./h sizeof(u_int16_t) = 8 sizeof(h) = 320 % Assumptions that filling only two bytes of hash for an unsigned short type is a bad one on a cray (or at least on a Y-MP EL which was used to give the above information). The reason to avoid memset is less clear to me. It could be that assumptions are being made in the OpenSSH code that the upper bytes of the h[] array are zero instead of 0xffff. I have not looked closely at that part of the OpenSSH code. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
http://bugzilla.mindrot.org/show_bug.cgi?id=775 ------- Additional Comments From dtucker at zip.com.au 2005-01-08 10:42 ------- OK, that makes sense: later in the code the hash values are compared directly with "h[i] != HASH_UNUSED", where HASH_UNUSED is defined as 0xffff. If sizeof(u_int16) == 8 (whoa!) and the array is filled with memset then the array values will be 0xffffffffffffffff instead of 0xffff, so that obviously won't work. I think it would be OK to commit, but with "#if (SIZEOF_SHORT_INT != 2)" instead of #ifdef _UNICOS". ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.