[Bug 775] patches for Cray systems

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon Dec 20 11:55:41 EST 2004


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.




More information about the openssh-bugs mailing list