You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is MAX_HOSTNAME_LEN is the maximum total characters of the hostname not including the end of string character '\0'. If the hostname happens to be 64 characters long, gethostname() would return an error and shmem_runtime_util_put_hostname() would state error "gethostname failed (-1)"
The input length parameter needs to be set to MAX_HOSTNAME_LEN+1
The text was updated successfully, but these errors were encountered:
MAX_HOSTNAME_LEN is the maximum total characters of the hostname not
including the end of string character '\0'. If the hostname happens to
be 64 characters long, gethostname() would return an error and
shmem_runtime_util_put_hostname() would state error "gethostname failed
(-1)"
Changed length to MAX_HOSTNAME_LEN+1
Issue Sandia-OpenSHMEM#1159
Signed-off-by: Mark F. Brown <[email protected]>
MAX_HOSTNAME_LEN is the maximum total characters of the hostname not
including the end of string character '\0'. If the hostname happens to
be 64 characters long, gethostname() would return an error and
shmem_runtime_util_put_hostname() would state error "gethostname failed
(-1)"
Changed length to MAX_HOSTNAME_LEN+1
Issue Sandia-OpenSHMEM#1159
Signed-off-by: Mark F. Brown <[email protected]>
src/runtime_util.c: shmem_runtime_util_put_hostname() calls gethostname() with a length of MAX_HOSTNAME_LEN (which resolves to 64 bytes in Linux).
The issue is MAX_HOSTNAME_LEN is the maximum total characters of the hostname not including the end of string character '\0'. If the hostname happens to be 64 characters long, gethostname() would return an error and shmem_runtime_util_put_hostname() would state error "gethostname failed (-1)"
The input length parameter needs to be set to MAX_HOSTNAME_LEN+1
The text was updated successfully, but these errors were encountered: