diff --git a/NEWS b/NEWS index e3c70d28624dd19bda7efd8981a93b71cf13d0a3..39e3dd70067190d6385eab62517f1a89fe503ebc 100644 --- a/NEWS +++ b/NEWS @@ -1,12 +1,20 @@ This file describes changes in recent versions of SLURM. It primarily documents those changes that are of interest to users and admins. +* Changes in SLURM 1.3.0-pre8 +============================= + -- Modify how strings are packed in the RPCs, Maximum string size + increased from 64KB (16-bit size field) to 4GB (32-bit size field). + +* Changes in SLURM 1.3.0-pre7 +============================= + -- Fix a bug in the processing of srun's --exclusive option for a job step. + * Changes in SLURM 1.3.0-pre6 ============================= -- Add support for configurable number of jobs to share resources using the partition Shared parameter in slurm.conf (e.g. "Shared=FORCE:3" for two jobs to share the resources). From Chris Holmes, HP. - -- Fix a bug in the processing of srun's --exclusive option for a job step. -- Made salloc use api instead of local code for message handling * Changes in SLURM 1.3.0-pre5 diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 7fe25cb17737afd11d3d0620dbef2bf172ce3976..adf31e9faf85edab0d4cd138c402e03a5f576a62 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -446,7 +446,7 @@ typedef struct job_descriptor { /* For submit, allocate, and update requests */ * 0 otherwise,default=1 */ char **environment; /* environment variables to set for job, * name=value pairs, one per line */ - uint16_t env_size; /* element count in environment */ + uint32_t env_size; /* element count in environment */ char *features; /* comma separated list of required features, * default NONE */ uint16_t immediate; /* 1 if allocate to run or fail immediately, @@ -500,7 +500,7 @@ typedef struct job_descriptor { /* For submit, allocate, and update requests */ uint16_t ntasks_per_core;/* number of tasks to invoke on each core */ char *script; /* the actual job script, default NONE */ char **argv; /* arguments to the script */ - uint16_t argc; /* number of arguments to the script */ + uint32_t argc; /* number of arguments to the script */ char *err; /* pathname of stderr */ char *in; /* pathname of stdin */ char *out; /* pathname of stdout */ @@ -643,7 +643,7 @@ typedef struct job_info_msg { } job_info_msg_t; typedef struct slurm_step_layout { - uint16_t node_cnt; /* node count */ + uint32_t node_cnt; /* node count */ uint32_t task_cnt; /* total number of tasks in the step */ char *node_list; /* list of nodes in step */ /* Array of length "node_cnt". Each element of the array @@ -741,9 +741,9 @@ typedef struct { } slurm_step_ctx_params_t; typedef struct { - uint16_t argc; + uint32_t argc; char **argv; - uint16_t envc; + uint32_t envc; char **env; char *cwd; bool user_managed_io; diff --git a/src/common/env.c b/src/common/env.c index 57827a3830da7b07a6b2712add77e5d82593c2b8..65cd0a9d1b366d3e0bfb963ec0cde2a048529b63 100644 --- a/src/common/env.c +++ b/src/common/env.c @@ -77,7 +77,7 @@ strong_alias(env_array_overwrite_fmt, slurm_env_array_overwrite_fmt); #define SU_WAIT_MSEC 8000 /* 8000 msec for /bin/su to return user * env vars for --get-user-env option */ -#define ENV_BUFSIZE (64 * 1024) +#define ENV_BUFSIZE (256 * 1024) /* * Return pointer to `name' entry in environment if found, or diff --git a/src/common/io_hdr.c b/src/common/io_hdr.c index 8b004b6a56525efaaa3367d397aa1b767524d566..efb17e88f77b825b6736f376bc5ab777f9396687 100644 --- a/src/common/io_hdr.c +++ b/src/common/io_hdr.c @@ -179,7 +179,7 @@ io_init_msg_packed_size(void) len = sizeof(uint16_t) /* version */ + sizeof(uint32_t) /* nodeid */ - + (SLURM_IO_KEY_SIZE + sizeof(uint16_t)) /* signature */ + + (SLURM_IO_KEY_SIZE + sizeof(uint32_t)) /* signature */ + sizeof(uint32_t) /* stdout_objs */ + sizeof(uint32_t); /* stderr_objs */ return len; @@ -193,15 +193,14 @@ io_init_msg_pack(struct slurm_io_init_msg *hdr, Buf buffer) pack32(hdr->stdout_objs, buffer); pack32(hdr->stderr_objs, buffer); packmem((char *) hdr->cred_signature, - (uint16_t) SLURM_IO_KEY_SIZE, buffer); + (uint32_t) SLURM_IO_KEY_SIZE, buffer); } static int io_init_msg_unpack(struct slurm_io_init_msg *hdr, Buf buffer) { - uint16_t val; - + uint32_t val; safe_unpack16(&hdr->version, buffer); safe_unpack32(&hdr->nodeid, buffer); safe_unpack32(&hdr->stdout_objs, buffer); diff --git a/src/common/job_options.c b/src/common/job_options.c index f4ba8a9cbcf6b9551b0a551b3bd0edfb946791c0..7ae273a962be1df04c587a83a0b6880c1b28614e 100644 --- a/src/common/job_options.c +++ b/src/common/job_options.c @@ -94,19 +94,16 @@ static struct job_option_info * job_option_info_unpack (Buf buf) { struct job_option_info *ji = xmalloc (sizeof (*ji)); uint32_t type; - uint16_t len; + uint32_t len; - if (unpack32 (&type, buf) != SLURM_SUCCESS) - goto error; - if (unpackstr_xmalloc (&ji->option, &len, buf) != SLURM_SUCCESS) - goto error; - if (unpackstr_xmalloc (&ji->optarg, &len, buf) != SLURM_SUCCESS) - goto error; + safe_unpack32 (&type, buf); + safe_unpackstr_xmalloc (&ji->option, &len, buf); + safe_unpackstr_xmalloc (&ji->optarg, &len, buf); ji->type = (int) type; return (ji); - error: + unpack_error: job_option_info_destroy (ji); return (NULL); } @@ -196,19 +193,18 @@ int job_options_pack (job_options_t opts, Buf buf) int job_options_unpack (job_options_t opts, Buf buf) { uint32_t count; - uint16_t len; - char * tag; + uint32_t len; + char * tag = NULL; int i; - if (unpackstr_xmalloc (&tag, &len, buf) != SLURM_SUCCESS) - return (SLURM_ERROR); + safe_unpackstr_xmalloc (&tag, &len, buf); if (strncmp (tag, JOB_OPTIONS_PACK_TAG, len) != 0) { xfree(tag); return (-1); } xfree(tag); - unpack32 (&count, buf); + safe_unpack32 (&count, buf); for (i = 0; i < count; i++) { struct job_option_info *ji; @@ -218,6 +214,10 @@ int job_options_unpack (job_options_t opts, Buf buf) } return (0); + + unpack_error: + xfree(tag); + return SLURM_ERROR; } /* diff --git a/src/common/pack.c b/src/common/pack.c index 50bbe43d9eb9734cd400304130373ae55b32704b..8dc2b102b5683eb7ec63ba982fff1650dc4471ff 100644 --- a/src/common/pack.c +++ b/src/common/pack.c @@ -333,9 +333,9 @@ int unpack8(uint8_t * valp, Buf buffer) * size_val to network byte order and store at buffer followed by * the data at valp. Adjust buffer counters. */ -void packmem(char *valp, uint16_t size_val, Buf buffer) +void packmem(char *valp, uint32_t size_val, Buf buffer) { - uint16_t ns = htons(size_val); + uint32_t ns = htonl(size_val); if (remaining_buf(buffer) < (sizeof(ns) + size_val)) { buffer->size += (size_val + BUF_SIZE); @@ -360,15 +360,15 @@ void packmem(char *valp, uint16_t size_val, Buf buffer) * NOTE: valp is set to point into the buffer bufp, a copy of * the data is not made */ -int unpackmem_ptr(char **valp, uint16_t * size_valp, Buf buffer) +int unpackmem_ptr(char **valp, uint32_t * size_valp, Buf buffer) { - uint16_t ns; + uint32_t ns; if (remaining_buf(buffer) < sizeof(ns)) return SLURM_ERROR; memcpy(&ns, &buffer->head[buffer->processed], sizeof(ns)); - *size_valp = ntohs(ns); + *size_valp = ntohl(ns); buffer->processed += sizeof(ns); if (*size_valp > 0) { @@ -390,15 +390,15 @@ int unpackmem_ptr(char **valp, uint16_t * size_valp, Buf buffer) * NOTE: The caller is responsible for the management of valp and * insuring it has sufficient size */ -int unpackmem(char *valp, uint16_t * size_valp, Buf buffer) +int unpackmem(char *valp, uint32_t * size_valp, Buf buffer) { - uint16_t ns; + uint32_t ns; if (remaining_buf(buffer) < sizeof(ns)) return SLURM_ERROR; memcpy(&ns, &buffer->head[buffer->processed], sizeof(ns)); - *size_valp = ntohs(ns); + *size_valp = ntohl(ns); buffer->processed += sizeof(ns); if (*size_valp > 0) { @@ -420,15 +420,15 @@ int unpackmem(char *valp, uint16_t * size_valp, Buf buffer) * the caller is responsible for calling xfree() on *valp * if non-NULL (set to NULL on zero size buffer value) */ -int unpackmem_xmalloc(char **valp, uint16_t * size_valp, Buf buffer) +int unpackmem_xmalloc(char **valp, uint32_t * size_valp, Buf buffer) { - uint16_t ns; + uint32_t ns; if (remaining_buf(buffer) < sizeof(ns)) return SLURM_ERROR; memcpy(&ns, &buffer->head[buffer->processed], sizeof(ns)); - *size_valp = ntohs(ns); + *size_valp = ntohl(ns); buffer->processed += sizeof(ns); if (*size_valp > 0) { @@ -452,15 +452,15 @@ int unpackmem_xmalloc(char **valp, uint16_t * size_valp, Buf buffer) * the caller is responsible for calling free() on *valp * if non-NULL (set to NULL on zero size buffer value) */ -int unpackmem_malloc(char **valp, uint16_t * size_valp, Buf buffer) +int unpackmem_malloc(char **valp, uint32_t * size_valp, Buf buffer) { - uint16_t ns; + uint32_t ns; if (remaining_buf(buffer) < sizeof(ns)) return SLURM_ERROR; memcpy(&ns, &buffer->head[buffer->processed], sizeof(ns)); - *size_valp = ntohs(ns); + *size_valp = ntohl(ns); buffer->processed += sizeof(ns); if (*size_valp > 0) { @@ -480,10 +480,10 @@ int unpackmem_malloc(char **valp, uint16_t * size_valp, Buf buffer) * (size_val), convert size_val to network byte order and store in the * buffer followed by the data at valp. Adjust buffer counters. */ -void packstr_array(char **valp, uint16_t size_val, Buf buffer) +void packstr_array(char **valp, uint32_t size_val, Buf buffer) { int i; - uint16_t ns = htons(size_val); + uint32_t ns = htonl(size_val); if (remaining_buf(buffer) < sizeof(ns)) { buffer->size += BUF_SIZE; @@ -507,23 +507,23 @@ void packstr_array(char **valp, uint16_t size_val, Buf buffer) * the caller is responsible for calling xfree on *valp * if non-NULL (set to NULL on zero size buffer value) */ -int unpackstr_array(char ***valp, uint16_t * size_valp, Buf buffer) +int unpackstr_array(char ***valp, uint32_t * size_valp, Buf buffer) { int i; - uint16_t ns; - uint16_t uint16_tmp; + uint32_t ns; + uint32_t uint32_tmp; if (remaining_buf(buffer) < sizeof(ns)) return SLURM_ERROR; memcpy(&ns, &buffer->head[buffer->processed], sizeof(ns)); - *size_valp = ntohs(ns); + *size_valp = ntohl(ns); buffer->processed += sizeof(ns); if (*size_valp > 0) { *valp = xmalloc(sizeof(char *) * (*size_valp + 1)); for (i = 0; i < *size_valp; i++) { - if (unpackmem_xmalloc(&(*valp)[i], &uint16_tmp, buffer)) + if (unpackmem_xmalloc(&(*valp)[i], &uint32_tmp, buffer)) return SLURM_ERROR; } (*valp)[i] = NULL; /* NULL terminated array so that execle */ diff --git a/src/common/pack.h b/src/common/pack.h index fd5b8e6bb5319853f504ef2cffcc9d1f615c7739..baaa55a266c7ad6058e9637bd00bd207487a72d5 100644 --- a/src/common/pack.h +++ b/src/common/pack.h @@ -98,14 +98,14 @@ int unpack16_array(uint16_t **valp, uint32_t* size_val, Buf buffer); void pack32_array(uint32_t *valp, uint32_t size_val, Buf buffer); int unpack32_array(uint32_t **valp, uint32_t* size_val, Buf buffer); -void packmem(char *valp, uint16_t size_val, Buf buffer); -int unpackmem(char *valp, uint16_t *size_valp, Buf buffer); -int unpackmem_ptr(char **valp, uint16_t *size_valp, Buf buffer); -int unpackmem_xmalloc(char **valp, uint16_t *size_valp, Buf buffer); -int unpackmem_malloc(char **valp, uint16_t *size_valp, Buf buffer); +void packmem(char *valp, uint32_t size_val, Buf buffer); +int unpackmem(char *valp, uint32_t *size_valp, Buf buffer); +int unpackmem_ptr(char **valp, uint32_t *size_valp, Buf buffer); +int unpackmem_xmalloc(char **valp, uint32_t *size_valp, Buf buffer); +int unpackmem_malloc(char **valp, uint32_t *size_valp, Buf buffer); -void packstr_array(char **valp, uint16_t size_val, Buf buffer); -int unpackstr_array(char ***valp, uint16_t* size_val, Buf buffer); +void packstr_array(char **valp, uint32_t size_val, Buf buffer); +int unpackstr_array(char ***valp, uint32_t* size_val, Buf buffer); void packmem_array(char *valp, uint32_t size_val, Buf buffer); int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); @@ -189,7 +189,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); } while (0) #define safe_packmem(valp,size_val,buf) do { \ - assert(sizeof(size_val) == sizeof(uint16_t)); \ + assert(sizeof(size_val) == sizeof(uint32_t)); \ assert(size_val == 0 || valp != NULL); \ assert(buf->magic == BUF_MAGIC); \ packmem(valp,size_val,buf); \ @@ -197,7 +197,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); #define safe_unpackmem(valp,size_valp,buf) do { \ assert(valp != NULL); \ - assert(sizeof(*size_valp) == sizeof(uint16_t)); \ + assert(sizeof(*size_valp) == sizeof(uint32_t)); \ assert(buf->magic == BUF_MAGIC); \ if (unpackmem(valp,size_valp,buf)) \ goto unpack_error; \ @@ -205,7 +205,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); #define safe_unpackmem_ptr(valp,size_valp,buf) do { \ assert(valp != NULL); \ - assert(sizeof(*size_valp) == sizeof(uint16_t)); \ + assert(sizeof(*size_valp) == sizeof(uint32_t)); \ assert(buf->magic == BUF_MAGIC); \ if (unpackmem_ptr(valp,size_valp,buf)) \ goto unpack_error; \ @@ -213,7 +213,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); #define safe_unpackmem_xmalloc(valp,size_valp,buf) do { \ assert(valp != NULL); \ - assert(sizeof(*size_valp) == sizeof(uint16_t)); \ + assert(sizeof(*size_valp) == sizeof(uint32_t)); \ assert(buf->magic == BUF_MAGIC); \ if (unpackmem_xmalloc(valp,size_valp,buf)) \ goto unpack_error; \ @@ -221,7 +221,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); #define safe_unpackmem_malloc(valp,size_valp,buf) do { \ assert(valp != NULL); \ - assert(sizeof(*size_valp) == sizeof(uint16_t)); \ + assert(sizeof(*size_valp) == sizeof(uint32_t)); \ assert(buf->magic == BUF_MAGIC); \ if (unpackmem_malloc(valp,size_valp,buf)) \ goto unpack_error; \ @@ -235,32 +235,32 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); uint32_t _size; \ bit_fmt(_tmp_str,max_len,bitmap); \ _size = strlen(_tmp_str)+1; \ - packmem(_tmp_str,(uint16_t)_size,buf); \ + packmem(_tmp_str,_size,buf); \ } else \ - packmem(NULL,(uint16_t)0,buf); \ + packmem(NULL,(uint32_t)0,buf); \ } while (0) #define safe_packstr(str,max_len,buf) do { \ uint32_t _size; \ assert(buf->magic == BUF_MAGIC); \ - assert(max_len <= 0xffff); \ + assert(sizeof(*max_len) === sizeof(uint32_t)); \ _size = (str ? strlen(str)+1 : 0); \ assert(_size == 0 || str != NULL); \ if (_size <= max_len) \ - packmem(str,(uint16_t)_size,buf); \ + packmem(str,_size,buf); \ else { \ char tmp_str[max_len]; \ strncpy(tmp_str, str, max_len-1); \ tmp_str[max_len - 1] = (char) NULL; \ - packmem(tmp_str,(uint16_t)max_len,buf); \ + packmem(tmp_str,max_len,buf); \ } \ } while (0) #define packstr(str,buf) do { \ uint32_t _size; \ _size = (uint32_t)(str ? strlen(str)+1 : 0); \ - assert(_size == 0 || str != NULL); \ - assert(_size <= 0xffff); \ + assert(_size == 0 || str != NULL); \ + assert(_size <= 0xfffff); \ assert(buf->magic == BUF_MAGIC); \ packmem(str,(uint16_t)_size,buf); \ } while (0) @@ -278,9 +278,9 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); uint32_t _size; \ bit_fmt(_tmp_str,0xfffe,bitmap); \ _size = strlen(_tmp_str)+1; \ - packmem(_tmp_str,(uint16_t)_size,buf); \ + packmem(_tmp_str,_size,buf); \ } else \ - packmem(NULL,(uint16_t)0,buf); \ + packmem(NULL,(uint32_t)0,buf); \ } while (0) #define unpackstr_ptr \ @@ -300,6 +300,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); #define safe_packstr_array(array,size_val,buf) do { \ assert(size_val == 0 || array != NULL); \ + assert(sizeof(*size_valp) == sizeof(uint32_t)); \ assert(buf->magic == BUF_MAGIC); \ packstr_array(array,size_val,buf); \ } while (0) @@ -307,7 +308,7 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer); #define safe_unpackstr_array(valp,size_valp,buf) do { \ assert(valp != NULL); \ assert(size_valp != NULL); \ - assert(sizeof(*size_valp) == sizeof(uint16_t)); \ + assert(sizeof(*size_valp) == sizeof(uint32_t)); \ assert(buf->magic == BUF_MAGIC); \ if (unpackstr_array(valp,size_valp,buf)) \ goto unpack_error; \ diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index 39462fadb2368c09f14188aa094b82c14712f675..793d2fc1df762d38d817fe2f90e1ec8475f8ea1f 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -965,7 +965,7 @@ slurm_cred_pack(slurm_cred_t cred, Buf buffer) slurm_cred_t slurm_cred_unpack(Buf buffer) { - uint16_t len; + uint32_t len; uint32_t tmpint; slurm_cred_t cred = NULL; char **sigp; diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index c289b012e4cbd6bfd94c7d20038cfea82433df4b..2f68806ed38f15c563989693632ba240cb53e742 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -1835,11 +1835,11 @@ int slurm_unpack_slurm_addr_no_alloc(slurm_addr * slurm_address, * returns - SLURM error code */ void slurm_pack_slurm_addr_array(slurm_addr * slurm_address, - uint16_t size_val, Buf buffer) + uint32_t size_val, Buf buffer) { int i = 0; - uint16_t nl = htons(size_val); - pack16((uint16_t)nl, buffer); + uint32_t nl = htonl(size_val); + pack32(nl, buffer); for (i = 0; i < size_val; i++) { slurm_pack_slurm_addr(slurm_address + i, buffer); @@ -1855,14 +1855,14 @@ void slurm_pack_slurm_addr_array(slurm_addr * slurm_address, * returns - SLURM error code */ int slurm_unpack_slurm_addr_array(slurm_addr ** slurm_address, - uint16_t * size_val, Buf buffer) + uint32_t * size_val, Buf buffer) { int i = 0; - uint16_t nl; + uint32_t nl; *slurm_address = NULL; - safe_unpack16(&nl, buffer); - *size_val = ntohs(nl); + safe_unpack32(&nl, buffer); + *size_val = ntohl(nl); *slurm_address = xmalloc((*size_val) * sizeof(slurm_addr)); for (i = 0; i < *size_val; i++) { diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h index 990dd9b9822f8ff8f043feb6316d5c5158eeed18..10c7d9720db4338dd1bc27e03e5730572d71d4d9 100644 --- a/src/common/slurm_protocol_api.h +++ b/src/common/slurm_protocol_api.h @@ -674,7 +674,7 @@ int inline slurm_unpack_slurm_addr_no_alloc(slurm_addr * slurm_address, * returns - SLURM error code */ void inline slurm_pack_slurm_addr_array(slurm_addr * slurm_address, - uint16_t size_val, Buf buffer); + uint32_t size_val, Buf buffer); /* slurm_unpack_slurm_addr_array * unpacks an array of slurm_addrs from a buffer * OUT slurm_address - slurm_addr to unpack to @@ -683,7 +683,7 @@ void inline slurm_pack_slurm_addr_array(slurm_addr * slurm_address, * returns - SLURM error code */ int inline slurm_unpack_slurm_addr_array(slurm_addr ** slurm_address, - uint16_t * size_val, Buf buffer); + uint32_t * size_val, Buf buffer); /**********************************************************************\ * simplified communication routines diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index c12d09f073340d77cd39879ca94a04f5fd3b1c37..69a7f32451f4288fecfffddab08d0e7a656807ed 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -419,8 +419,8 @@ typedef struct launch_tasks_request_msg { uint32_t uid; uint32_t gid; uint16_t *tasks_to_launch; - uint16_t envc; - uint16_t argc; + uint32_t envc; + uint32_t argc; uint16_t multi_prog; uint16_t *cpus_allocated; uint16_t max_sockets; @@ -544,9 +544,9 @@ typedef struct batch_job_launch_msg { char *in; /* pathname of stdin */ char *out; /* pathname of stdout */ char *work_dir; /* full pathname of working directory */ - uint16_t argc; + uint32_t argc; char **argv; - uint16_t envc; /* element count in environment */ + uint32_t envc; /* element count in environment */ char **environment; /* environment variables to set for job, * name=value pairs, one per line */ select_jobinfo_t select_jobinfo; /* opaque data type */ @@ -566,7 +566,7 @@ typedef struct job_id_response_msg { typedef struct srun_exec_msg { uint32_t job_id; /* slurm job_id */ uint32_t step_id; /* step_id or NO_VAL */ - uint16_t argc; /* argument count */ + uint32_t argc; /* argument count */ char ** argv; /* program arguments */ } srun_exec_msg_t; diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index c84028281d097a28a0e27cdf9b51a04e9d70029f..7323fd3763ba43eb1a761eac40abcdd3593c7349 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -253,9 +253,9 @@ static void _pack_last_update_msg(last_update_msg_t * msg, Buf buffer); static int _unpack_last_update_msg(last_update_msg_t ** msg, Buf buffer); static void _pack_slurm_addr_array(slurm_addr * slurm_address, - uint16_t size_val, Buf buffer); + uint32_t size_val, Buf buffer); static int _unpack_slurm_addr_array(slurm_addr ** slurm_address, - uint16_t * size_val, Buf buffer); + uint32_t * size_val, Buf buffer); static void _pack_ret_list(List ret_list, uint16_t size_val, Buf buffer); static int _unpack_ret_list(List *ret_list, uint16_t size_val, Buf buffer); @@ -366,7 +366,8 @@ pack_header(header_t * header, Buf buffer) int unpack_header(header_t * header, Buf buffer) { - uint16_t uint16_tmp = 0; + uint16_t uint16_tmp; + uint32_t uint32_tmp = 0; memset(header, 0, sizeof(header_t)); forward_init(&header->forward, NULL); @@ -379,7 +380,7 @@ unpack_header(header_t * header, Buf buffer) safe_unpack16(&header->forward.cnt, buffer); if (header->forward.cnt > 0) { safe_unpackstr_xmalloc(&header->forward.nodelist, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack32(&header->forward.timeout, buffer); } @@ -1055,7 +1056,7 @@ _pack_update_node_msg(update_node_msg_t * msg, Buf buffer) static int _unpack_update_node_msg(update_node_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; update_node_msg_t *tmp_ptr; /* alloc memory for structure */ @@ -1063,10 +1064,10 @@ _unpack_update_node_msg(update_node_msg_t ** msg, Buf buffer) tmp_ptr = xmalloc(sizeof(update_node_msg_t)); *msg = tmp_ptr; - safe_unpackstr_xmalloc(&tmp_ptr->node_names, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->node_names, &uint32_tmp, buffer); safe_unpack16(&tmp_ptr->node_state, buffer); - safe_unpackstr_xmalloc(&tmp_ptr->features, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&tmp_ptr->reason, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->reason, &uint32_tmp, buffer); return SLURM_SUCCESS; unpack_error: @@ -1110,7 +1111,7 @@ static int _unpack_node_registration_status_msg(slurm_node_registration_status_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; int i; slurm_node_registration_status_msg_t *node_reg_ptr; @@ -1123,7 +1124,7 @@ _unpack_node_registration_status_msg(slurm_node_registration_status_msg_t safe_unpack_time(&node_reg_ptr->timestamp, buffer); /* load the data values */ safe_unpack32(&node_reg_ptr->status, buffer); - safe_unpackstr_xmalloc(&node_reg_ptr->node_name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->node_name, &uint32_tmp, buffer); safe_unpack16(&node_reg_ptr->cpus, buffer); safe_unpack16(&node_reg_ptr->sockets, buffer); safe_unpack16(&node_reg_ptr->cores, buffer); @@ -1185,7 +1186,6 @@ static int _unpack_resource_allocation_response_msg(resource_allocation_response_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; resource_allocation_response_msg_t *tmp_ptr; @@ -1197,7 +1197,7 @@ _unpack_resource_allocation_response_msg(resource_allocation_response_msg_t /* load the data values */ safe_unpack32(&tmp_ptr->error_code, buffer); safe_unpack32(&tmp_ptr->job_id, buffer); - safe_unpackstr_xmalloc(&tmp_ptr->node_list, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->node_list, &uint32_tmp, buffer); safe_unpack16(&tmp_ptr->num_cpu_groups, buffer); if (tmp_ptr->num_cpu_groups > 0) { @@ -1261,7 +1261,6 @@ static int _unpack_job_alloc_info_response_msg(job_alloc_info_response_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; job_alloc_info_response_msg_t *tmp_ptr; @@ -1273,7 +1272,7 @@ _unpack_job_alloc_info_response_msg(job_alloc_info_response_msg_t ** msg, /* load the data values */ safe_unpack32(&tmp_ptr->error_code, buffer); safe_unpack32(&tmp_ptr->job_id, buffer); - safe_unpackstr_xmalloc(&tmp_ptr->node_list, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->node_list, &uint32_tmp, buffer); safe_unpack16(&tmp_ptr->num_cpu_groups, buffer); if (tmp_ptr->num_cpu_groups > 0) { @@ -1295,9 +1294,9 @@ _unpack_job_alloc_info_response_msg(job_alloc_info_response_msg_t ** msg, safe_unpack32(&tmp_ptr->node_cnt, buffer); if (tmp_ptr->node_cnt > 0) { if (_unpack_slurm_addr_array(&(tmp_ptr->node_addr), - &uint16_tmp, buffer)) + &uint32_tmp, buffer)) goto unpack_error; - if (uint16_tmp != tmp_ptr->node_cnt) + if (uint32_tmp != tmp_ptr->node_cnt) goto unpack_error; } else tmp_ptr->node_addr = NULL; @@ -1384,11 +1383,11 @@ unpack_error: static int _unpack_node_info_members(node_info_t * node, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; xassert(node != NULL); - safe_unpackstr_xmalloc(&node->name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&node->name, &uint32_tmp, buffer); safe_unpack16(&node->node_state, buffer); safe_unpack16(&node->cpus, buffer); safe_unpack16(&node->sockets, buffer); @@ -1400,8 +1399,8 @@ _unpack_node_info_members(node_info_t * node, Buf buffer) safe_unpack32(&node->weight, buffer); safe_unpack16(&node->used_cpus, buffer); - safe_unpackstr_xmalloc(&node->features, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&node->reason, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&node->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->reason, &uint32_tmp, buffer); return SLURM_SUCCESS; @@ -1443,7 +1442,7 @@ _pack_update_partition_msg(update_part_msg_t * msg, Buf buffer) static int _unpack_update_partition_msg(update_part_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; update_part_msg_t *tmp_ptr; xassert(msg != NULL); @@ -1452,13 +1451,13 @@ _unpack_update_partition_msg(update_part_msg_t ** msg, Buf buffer) tmp_ptr = xmalloc(sizeof(update_part_msg_t)); *msg = tmp_ptr; - safe_unpackstr_xmalloc(&tmp_ptr->allow_groups, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->allow_groups, &uint32_tmp, buffer); safe_unpack16(&tmp_ptr->default_part, buffer); safe_unpack32(&tmp_ptr->max_time, buffer); safe_unpack32(&tmp_ptr->max_nodes, buffer); safe_unpack32(&tmp_ptr->min_nodes, buffer); - safe_unpackstr_xmalloc(&tmp_ptr->name, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&tmp_ptr->nodes, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->nodes, &uint32_tmp, buffer); safe_unpack16(&tmp_ptr->hidden, buffer); safe_unpack16(&tmp_ptr->max_share, buffer); @@ -1487,7 +1486,7 @@ _pack_delete_partition_msg(delete_part_msg_t * msg, Buf buffer) static int _unpack_delete_partition_msg(delete_part_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; delete_part_msg_t *tmp_ptr; xassert(msg != NULL); @@ -1496,7 +1495,7 @@ _unpack_delete_partition_msg(delete_part_msg_t ** msg, Buf buffer) tmp_ptr = xmalloc(sizeof(delete_part_msg_t)); *msg = tmp_ptr; - safe_unpackstr_xmalloc(&tmp_ptr->name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->name, &uint32_tmp, buffer); return SLURM_SUCCESS; unpack_error: @@ -1538,7 +1537,7 @@ static int _unpack_job_step_create_request_msg(job_step_create_request_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; job_step_create_request_msg_t *tmp_ptr; /* alloc memory for structure */ @@ -1560,10 +1559,10 @@ _unpack_job_step_create_request_msg(job_step_create_request_msg_t ** msg, safe_unpack16(&(tmp_ptr->exclusive), buffer); safe_unpack16(&(tmp_ptr->immediate), buffer); - safe_unpackstr_xmalloc(&(tmp_ptr->host), &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&(tmp_ptr->name), &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&(tmp_ptr->network), &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&(tmp_ptr->node_list), &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->host), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->name), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->network), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->node_list), &uint32_tmp, buffer); safe_unpack8(&(tmp_ptr->overcommit), buffer); @@ -1594,7 +1593,7 @@ _pack_kill_job_msg(kill_job_msg_t * msg, Buf buffer) static int _unpack_kill_job_msg(kill_job_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; kill_job_msg_t *tmp_ptr; /* alloc memory for structure */ @@ -1605,7 +1604,7 @@ _unpack_kill_job_msg(kill_job_msg_t ** msg, Buf buffer) safe_unpack32(&(tmp_ptr->job_id), buffer); safe_unpack32(&(tmp_ptr->job_uid), buffer); safe_unpack_time(&(tmp_ptr->time), buffer); - safe_unpackstr_xmalloc(&(tmp_ptr->nodes), &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->nodes), &uint32_tmp, buffer); if (select_g_alloc_jobinfo (&tmp_ptr->select_jobinfo) || select_g_unpack_jobinfo(tmp_ptr->select_jobinfo, buffer)) goto unpack_error; @@ -1666,7 +1665,7 @@ static int _unpack_epilog_comp_msg(epilog_complete_msg_t ** msg, Buf buffer) { epilog_complete_msg_t *tmp_ptr; - uint16_t uint16_tmp; + uint32_t uint32_tmp; /* alloc memory for structure */ xassert(msg); @@ -1675,7 +1674,7 @@ _unpack_epilog_comp_msg(epilog_complete_msg_t ** msg, Buf buffer) safe_unpack32(&(tmp_ptr->job_id), buffer); safe_unpack32(&(tmp_ptr->return_code), buffer); - safe_unpackstr_xmalloc(& (tmp_ptr->node_name), &uint16_tmp, buffer); + safe_unpackstr_xmalloc(& (tmp_ptr->node_name), &uint32_tmp, buffer); if (switch_g_alloc_node_info(&tmp_ptr->switch_nodeinfo) || switch_g_unpack_node_info(tmp_ptr->switch_nodeinfo, buffer)) goto unpack_error; @@ -1807,10 +1806,10 @@ unpack_error: static int _unpack_partition_info_members(partition_info_t * part, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; char *node_inx_str = NULL; - safe_unpackstr_xmalloc(&part->name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&part->name, &uint32_tmp, buffer); if (part->name == NULL) part->name = xmalloc(1); /* part->name = "" implicit */ safe_unpack32(&part->max_time, buffer); @@ -1827,9 +1826,9 @@ _unpack_partition_info_members(partition_info_t * part, Buf buffer) safe_unpack16(&part->priority, buffer); safe_unpack16(&part->state_up, buffer); - safe_unpackstr_xmalloc(&part->allow_groups, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&part->nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&node_inx_str, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&part->allow_groups, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&part->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); if (node_inx_str == NULL) part->node_inx = bitfmt2int(""); else { @@ -1899,7 +1898,7 @@ unpack_error: static int _unpack_job_step_info_members(job_step_info_t * step, Buf buffer) { - uint16_t uint16_tmp = 0; + uint32_t uint32_tmp = 0; char *node_inx_str; safe_unpack32(&step->job_id, buffer); @@ -1910,11 +1909,11 @@ _unpack_job_step_info_members(job_step_info_t * step, Buf buffer) safe_unpack_time(&step->start_time, buffer); safe_unpack_time(&step->run_time, buffer); - safe_unpackstr_xmalloc(&step->partition, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&step->nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&step->name, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&step->network, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&node_inx_str, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&step->partition, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->network, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); if (node_inx_str == NULL) step->node_inx = bitfmt2int(""); else { @@ -2007,7 +2006,6 @@ unpack_error: static int _unpack_job_info_members(job_info_t * job, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; char *node_inx_str; multi_core_data_t *mc_ptr; @@ -2030,21 +2028,21 @@ _unpack_job_info_members(job_info_t * job, Buf buffer) safe_unpack_time(&job->pre_sus_time, buffer); safe_unpack32(&job->priority, buffer); - safe_unpackstr_xmalloc(&job->nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->partition, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->account, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->network, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->comment, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->dependency, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->partition, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->account, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->network, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->comment, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->dependency, &uint32_tmp, buffer); safe_unpack32(&job->exit_code, buffer); safe_unpack16(&job->num_cpu_groups, buffer); safe_unpack32_array(&job->cpus_per_node, &uint32_tmp, buffer); safe_unpack32_array(&job->cpu_count_reps, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&job->name, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->alloc_node, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&node_inx_str, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->alloc_node, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); if (node_inx_str == NULL) job->node_inx = bitfmt2int(""); else { @@ -2058,9 +2056,9 @@ _unpack_job_info_members(job_info_t * job, Buf buffer) goto unpack_error; /*** unpack default job details ***/ - safe_unpackstr_xmalloc(&job->features, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->work_dir, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job->command, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->work_dir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->command, &uint32_tmp, buffer); safe_unpack32(&job->num_nodes, buffer); safe_unpack32(&job->max_nodes, buffer); @@ -2076,16 +2074,16 @@ _unpack_job_info_members(job_info_t * job, Buf buffer) safe_unpack32(&job->job_max_memory, buffer); safe_unpack32(&job->job_min_tmp_disk, buffer); - safe_unpackstr_xmalloc(&job->req_nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&node_inx_str, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job->req_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); if (node_inx_str == NULL) job->req_node_inx = bitfmt2int(""); else { job->req_node_inx = bitfmt2int(node_inx_str); xfree(node_inx_str); } - safe_unpackstr_xmalloc(&job->exc_nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&node_inx_str, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job->exc_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); if (node_inx_str == NULL) job->exc_node_inx = bitfmt2int(""); else { @@ -2258,7 +2256,7 @@ static int _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t ** build_buffer_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; slurm_ctl_conf_info_msg_t *build_ptr; /* alloc memory for structure */ @@ -2269,25 +2267,25 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t ** /* unpack timestamp of snapshot */ safe_unpack_time(&build_ptr->last_update, buffer); - safe_unpackstr_xmalloc(&build_ptr->authtype, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->authtype, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->backup_addr, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->backup_controller, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->backup_addr, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->backup_controller, &uint32_tmp, buffer); safe_unpack_time(&build_ptr->boot_time, buffer); safe_unpack16(&build_ptr->cache_groups, buffer); - safe_unpackstr_xmalloc(&build_ptr->checkpoint_type, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->checkpoint_type, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->control_addr, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->control_machine, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->control_addr, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->control_machine, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->crypto_type, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->crypto_type, &uint32_tmp, buffer); safe_unpack32(&build_ptr->def_mem_per_task, buffer); - safe_unpackstr_xmalloc(&build_ptr->epilog, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->epilog, &uint32_tmp, buffer); safe_unpack16(&build_ptr->fast_schedule, buffer); safe_unpack32(&build_ptr->first_job_id, buffer); @@ -2296,115 +2294,115 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t ** safe_unpack16(&build_ptr->job_acct_gather_freq, buffer); safe_unpackstr_xmalloc(&build_ptr->job_acct_gather_type, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->job_acct_storage_loc, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->job_acct_storage_type, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->job_acct_storage_user, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->job_acct_storage_host, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->job_acct_storage_pass, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack32(&build_ptr->job_acct_storage_port, buffer); - safe_unpackstr_xmalloc(&build_ptr->job_comp_loc, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->job_comp_type, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->job_comp_user, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->job_comp_host, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->job_comp_pass, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_loc, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_type, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_user, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_host, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_pass, &uint32_tmp, buffer); safe_unpack32(&build_ptr->job_comp_port, buffer); safe_unpackstr_xmalloc(&build_ptr->job_credential_private_key, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr-> job_credential_public_certificate, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack16(&build_ptr->job_file_append, buffer); safe_unpack16(&build_ptr->kill_wait, buffer); - safe_unpackstr_xmalloc(&build_ptr->mail_prog, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->mail_prog, &uint32_tmp, buffer); safe_unpack16(&build_ptr->max_job_cnt, buffer); safe_unpack32(&build_ptr->max_mem_per_task, buffer); safe_unpack16(&build_ptr->min_job_age, buffer); - safe_unpackstr_xmalloc(&build_ptr->mpi_default, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->mpi_default, &uint32_tmp, buffer); safe_unpack16(&build_ptr->msg_timeout, buffer); safe_unpack32(&build_ptr->next_job_id, buffer); - safe_unpackstr_xmalloc(&build_ptr->node_prefix, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->node_prefix, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->plugindir, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->plugstack, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->plugindir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->plugstack, &uint32_tmp, buffer); safe_unpack16(&build_ptr->private_data, buffer); - safe_unpackstr_xmalloc(&build_ptr->proctrack_type, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->proctrack_type, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->prolog, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->prolog, &uint32_tmp, buffer); safe_unpack16(&build_ptr->propagate_prio_process, buffer); safe_unpackstr_xmalloc(&build_ptr->propagate_rlimits, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->propagate_rlimits_except, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->resume_program, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack16(&build_ptr->resume_rate, buffer); safe_unpack16(&build_ptr->ret2service, buffer); - safe_unpackstr_xmalloc(&build_ptr->sched_conf, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->sched_conf, &uint32_tmp, buffer); safe_unpack16(&build_ptr->schedport, buffer); safe_unpack16(&build_ptr->schedrootfltr, buffer); safe_unpack16(&build_ptr->sched_time_slice, buffer); - safe_unpackstr_xmalloc(&build_ptr->schedtype, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->select_type, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->schedtype, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->select_type, &uint32_tmp, buffer); safe_unpack16(&build_ptr->select_type_param, buffer); safe_unpack32(&build_ptr->slurm_user_id, buffer); safe_unpackstr_xmalloc(&build_ptr->slurm_user_name, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack16(&build_ptr->slurmctld_debug, buffer); safe_unpackstr_xmalloc(&build_ptr->slurmctld_logfile, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->slurmctld_pidfile, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack32(&build_ptr->slurmctld_port, buffer); safe_unpack16(&build_ptr->slurmctld_timeout, buffer); safe_unpack16(&build_ptr->slurmd_debug, buffer); - safe_unpackstr_xmalloc(&build_ptr->slurmd_logfile, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->slurmd_logfile, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->slurmd_pidfile, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->slurmd_pidfile, &uint32_tmp, buffer); #ifndef MULTIPLE_SLURMD safe_unpack32(&build_ptr->slurmd_port, buffer); #endif - safe_unpackstr_xmalloc(&build_ptr->slurmd_spooldir, &uint16_tmp, + safe_unpackstr_xmalloc(&build_ptr->slurmd_spooldir, &uint32_tmp, buffer); safe_unpack16(&build_ptr->slurmd_timeout, buffer); - safe_unpackstr_xmalloc(&build_ptr->slurm_conf, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->srun_epilog, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->srun_prolog, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->slurm_conf, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->srun_epilog, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->srun_prolog, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->state_save_location, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->suspend_exc_nodes, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->suspend_exc_parts, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->suspend_program, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack16(&build_ptr->suspend_rate, buffer); safe_unpack16(&build_ptr->suspend_time, buffer); - safe_unpackstr_xmalloc(&build_ptr->switch_type, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->switch_type, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->task_epilog, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->task_prolog, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->task_plugin, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->task_epilog, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->task_prolog, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->task_plugin, &uint32_tmp, buffer); safe_unpack16(&build_ptr->task_plugin_param, buffer); - safe_unpackstr_xmalloc(&build_ptr->tmp_fs, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->tmp_fs, &uint32_tmp, buffer); safe_unpack16(&build_ptr->tree_width, buffer); safe_unpack16(&build_ptr->use_pam, buffer); safe_unpackstr_xmalloc(&build_ptr->unkillable_program, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack16(&build_ptr->unkillable_timeout, buffer); safe_unpack16(&build_ptr->wait_time, buffer); @@ -2601,7 +2599,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer) static int _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; job_desc_msg_t *job_desc_ptr; /* alloc memory for structure */ @@ -2613,11 +2611,11 @@ _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer) safe_unpack16(&job_desc_ptr->task_dist, buffer); safe_unpack16(&job_desc_ptr->plane_size, buffer); safe_unpack16(&job_desc_ptr->kill_on_node_fail, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->features, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->features, &uint32_tmp, buffer); safe_unpack32(&job_desc_ptr->job_id, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->name, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->alloc_node, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->alloc_node, &uint32_tmp, buffer); safe_unpack32(&job_desc_ptr->alloc_sid, buffer); safe_unpack16(&job_desc_ptr->job_min_procs, buffer); safe_unpack16(&job_desc_ptr->job_min_sockets, buffer); @@ -2627,26 +2625,26 @@ _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer) safe_unpack32(&job_desc_ptr->job_max_memory, buffer); safe_unpack32(&job_desc_ptr->job_min_tmp_disk, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->partition, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->partition, &uint32_tmp, buffer); safe_unpack32(&job_desc_ptr->priority, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->dependency, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->account, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->comment, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->dependency, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->account, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->comment, &uint32_tmp, buffer); safe_unpack16(&job_desc_ptr->nice, buffer); safe_unpack16(&job_desc_ptr->overcommit, buffer); safe_unpack32(&job_desc_ptr->num_tasks, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->req_nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->exc_nodes, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->req_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->exc_nodes, &uint32_tmp, buffer); safe_unpackstr_array(&job_desc_ptr->environment, &job_desc_ptr->env_size, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->script, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->script, &uint32_tmp, buffer); safe_unpackstr_array(&job_desc_ptr->argv, &job_desc_ptr->argc, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->err, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->in, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->out, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->work_dir, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->err, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->in, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->out, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->work_dir, &uint32_tmp, buffer); safe_unpack16(&job_desc_ptr->immediate, buffer); safe_unpack16(&job_desc_ptr->no_requeue, buffer); @@ -2671,11 +2669,11 @@ _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer) safe_unpack16(&job_desc_ptr->alloc_resp_port, buffer); safe_unpack16(&job_desc_ptr->other_port, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->network, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->network, &uint32_tmp, buffer); safe_unpack_time(&job_desc_ptr->begin_time, buffer); safe_unpack16(&job_desc_ptr->mail_type, buffer); - safe_unpackstr_xmalloc(&job_desc_ptr->mail_user, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->mail_user, &uint32_tmp, buffer); if (select_g_alloc_jobinfo (&job_desc_ptr->select_jobinfo) || select_g_unpack_jobinfo(job_desc_ptr->select_jobinfo, buffer)) @@ -2873,14 +2871,14 @@ _unpack_reattach_tasks_response_msg(reattach_tasks_response_msg_t ** msg_ptr, Buf buffer) { uint32_t ntasks; - uint16_t uint16_tmp; + uint32_t uint32_tmp; reattach_tasks_response_msg_t *msg = xmalloc(sizeof(*msg)); int i; xassert(msg_ptr != NULL); *msg_ptr = msg; - safe_unpackstr_xmalloc(&msg->node_name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->node_name, &uint32_tmp, buffer); safe_unpack32(&msg->return_code, buffer); safe_unpack32(&msg->ntasks, buffer); safe_unpack32_array(&msg->gtids, &ntasks, buffer); @@ -2889,7 +2887,7 @@ _unpack_reattach_tasks_response_msg(reattach_tasks_response_msg_t ** msg_ptr, goto unpack_error; msg->executable_names = (char **)xmalloc(sizeof(char *) * msg->ntasks); for (i = 0; i < msg->ntasks; i++) { - safe_unpackstr_xmalloc(&(msg->executable_names[i]), &uint16_tmp, + safe_unpackstr_xmalloc(&(msg->executable_names[i]), &uint32_tmp, buffer); } return SLURM_SUCCESS; @@ -2950,7 +2948,6 @@ static int _unpack_launch_tasks_response_msg(launch_tasks_response_msg_t ** msg_ptr, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; launch_tasks_response_msg_t *msg; @@ -2959,7 +2956,7 @@ _unpack_launch_tasks_response_msg(launch_tasks_response_msg_t ** *msg_ptr = msg; safe_unpack32(&msg->return_code, buffer); - safe_unpackstr_xmalloc(&msg->node_name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->node_name, &uint32_tmp, buffer); safe_unpack32(&msg->count_of_pids, buffer); safe_unpack32_array(&msg->local_pids, &uint32_tmp, buffer); if (msg->count_of_pids != uint32_tmp) @@ -3045,7 +3042,6 @@ static int _unpack_launch_tasks_request_msg(launch_tasks_request_msg_t ** msg_ptr, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; launch_tasks_request_msg_t *msg; int i=0; @@ -3094,19 +3090,19 @@ _unpack_launch_tasks_request_msg(launch_tasks_request_msg_t ** } slurm_unpack_slurm_addr_no_alloc(&msg->orig_addr, buffer); safe_unpackstr_array(&msg->env, &msg->envc, buffer); - safe_unpackstr_xmalloc(&msg->cwd, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->cwd, &uint32_tmp, buffer); safe_unpack16(&msg->cpu_bind_type, buffer); - safe_unpackstr_xmalloc(&msg->cpu_bind, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->cpu_bind, &uint32_tmp, buffer); safe_unpack16(&msg->mem_bind_type, buffer); - safe_unpackstr_xmalloc(&msg->mem_bind, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->mem_bind, &uint32_tmp, buffer); safe_unpackstr_array(&msg->argv, &msg->argc, buffer); safe_unpack16(&msg->task_flags, buffer); safe_unpack16(&msg->multi_prog, buffer); safe_unpack16(&msg->user_managed_io, buffer); if (msg->user_managed_io == 0) { - safe_unpackstr_xmalloc(&msg->ofname, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&msg->efname, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&msg->ifname, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->ofname, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->efname, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->ifname, &uint32_tmp, buffer); safe_unpack8(&msg->buffered_stdio, buffer); safe_unpack16(&msg->num_io_port, buffer); if (msg->num_io_port > 0) { @@ -3116,8 +3112,8 @@ _unpack_launch_tasks_request_msg(launch_tasks_request_msg_t ** safe_unpack16(&msg->io_port[i], buffer); } } - safe_unpackstr_xmalloc(&msg->task_prolog, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&msg->task_epilog, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->task_prolog, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->task_epilog, &uint32_tmp, buffer); safe_unpack16(&msg->slurmd_debug, buffer); switch_alloc_jobinfo(&msg->switch_job); @@ -3131,7 +3127,7 @@ _unpack_launch_tasks_request_msg(launch_tasks_request_msg_t ** error("Unable to unpack extra job options: %m"); goto unpack_error; } - safe_unpackstr_xmalloc(&msg->complete_nodelist, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->complete_nodelist, &uint32_tmp, buffer); safe_unpack8(&msg->pty, buffer); return SLURM_SUCCESS; @@ -3302,7 +3298,7 @@ _unpack_complete_batch_script_msg( complete_batch_script_msg_t ** msg_ptr, Buf buffer) { complete_batch_script_msg_t *msg; - uint16_t uint16_tmp; + uint32_t uint32_tmp; msg = xmalloc(sizeof(complete_batch_script_msg_t)); *msg_ptr = msg; @@ -3310,7 +3306,7 @@ _unpack_complete_batch_script_msg( safe_unpack32(&msg->job_id, buffer); safe_unpack32(&msg->job_rc, buffer); safe_unpack32(&msg->slurm_rc, buffer); - safe_unpackstr_xmalloc(&msg->node_name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->node_name, &uint32_tmp, buffer); return SLURM_SUCCESS; unpack_error: @@ -3547,14 +3543,14 @@ unpack_error: static void _pack_slurm_addr_array(slurm_addr * slurm_address, - uint16_t size_val, Buf buffer) + uint32_t size_val, Buf buffer) { slurm_pack_slurm_addr_array(slurm_address, size_val, buffer); } static int _unpack_slurm_addr_array(slurm_addr ** slurm_address, - uint16_t * size_val, Buf buffer) + uint32_t * size_val, Buf buffer) { return slurm_unpack_slurm_addr_array(slurm_address, size_val, buffer); } @@ -3585,8 +3581,9 @@ static int _unpack_ret_list(List *ret_list, uint16_t size_val, Buf buffer) { - int i = 0, j = 0; - uint16_t nl = 0, uint16_tmp; + int i = 0; + uint16_t uint16_tmp; + uint32_t uint32_tmp; ret_data_info_t *ret_data_info = NULL; slurm_msg_t msg; *ret_list = list_create(destroy_data_info); @@ -3599,7 +3596,7 @@ _unpack_ret_list(List *ret_list, safe_unpack16(&uint16_tmp, buffer); ret_data_info->type = (slurm_msg_type_t)uint16_tmp; safe_unpackstr_xmalloc(&ret_data_info->node_name, - &uint16_tmp, buffer); + &uint32_tmp, buffer); msg.msg_type = ret_data_info->type; if (unpack_msg(&msg, buffer) != SLURM_SUCCESS) goto unpack_error; @@ -3611,7 +3608,7 @@ _unpack_ret_list(List *ret_list, unpack_error: if (ret_data_info && ret_data_info->type) { error("_unpack_ret_list: message type %u, record %d of %u", - ret_data_info->type, j, nl); + ret_data_info->type, i, size_val); } list_destroy(*ret_list); *ret_list = NULL; @@ -3642,10 +3639,10 @@ _pack_batch_job_launch_msg(batch_job_launch_msg_t * msg, Buf buffer) packstr(msg->in, buffer); packstr(msg->out, buffer); - pack16((uint16_t)msg->argc, buffer); + pack32(msg->argc, buffer); packstr_array(msg->argv, msg->argc, buffer); - pack16((uint16_t)msg->envc, buffer); + pack32(msg->envc, buffer); packstr_array(msg->environment, msg->envc, buffer); slurm_cred_pack(msg->cred, buffer); @@ -3656,7 +3653,6 @@ _pack_batch_job_launch_msg(batch_job_launch_msg_t * msg, Buf buffer) static int _unpack_batch_job_launch_msg(batch_job_launch_msg_t ** msg, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; batch_job_launch_msg_t *launch_msg_ptr; @@ -3683,20 +3679,19 @@ _unpack_batch_job_launch_msg(batch_job_launch_msg_t ** msg, Buf buffer) if (launch_msg_ptr->num_cpu_groups != uint32_tmp) goto unpack_error; - safe_unpackstr_xmalloc(&launch_msg_ptr->nodes, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&launch_msg_ptr->script, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&launch_msg_ptr->work_dir, &uint16_tmp, - buffer); + safe_unpackstr_xmalloc(&launch_msg_ptr->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&launch_msg_ptr->script, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&launch_msg_ptr->work_dir, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&launch_msg_ptr->err, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&launch_msg_ptr->in, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&launch_msg_ptr->out, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&launch_msg_ptr->err, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&launch_msg_ptr->in, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&launch_msg_ptr->out, &uint32_tmp, buffer); - safe_unpack16(&launch_msg_ptr->argc, buffer); + safe_unpack32(&launch_msg_ptr->argc, buffer); safe_unpackstr_array(&launch_msg_ptr->argv, &launch_msg_ptr->argc, buffer); - safe_unpack16(&launch_msg_ptr->envc, buffer); + safe_unpack32(&launch_msg_ptr->envc, buffer); safe_unpackstr_array(&launch_msg_ptr->environment, &launch_msg_ptr->envc, buffer); @@ -3844,7 +3839,7 @@ _pack_srun_node_fail_msg(srun_node_fail_msg_t * msg, Buf buffer) static int _unpack_srun_node_fail_msg(srun_node_fail_msg_t ** msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; srun_node_fail_msg_t * msg; xassert ( msg_ptr != NULL ); @@ -3853,7 +3848,7 @@ _unpack_srun_node_fail_msg(srun_node_fail_msg_t ** msg_ptr, Buf buffer) safe_unpack32(&msg->job_id , buffer ) ; safe_unpack32(&msg->step_id , buffer ) ; - safe_unpackstr_xmalloc ( & msg->nodelist, &uint16_tmp, buffer); + safe_unpackstr_xmalloc ( & msg->nodelist, &uint32_tmp, buffer); return SLURM_SUCCESS; @@ -3932,7 +3927,7 @@ _pack_srun_user_msg(srun_user_msg_t * msg, Buf buffer) static int _unpack_srun_user_msg(srun_user_msg_t ** msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; srun_user_msg_t * msg_user; xassert ( msg_ptr != NULL ); @@ -3940,7 +3935,7 @@ _unpack_srun_user_msg(srun_user_msg_t ** msg_ptr, Buf buffer) *msg_ptr = msg_user; safe_unpack32(&msg_user->job_id, buffer); - safe_unpackstr_xmalloc(&msg_user->msg, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg_user->msg, &uint32_tmp, buffer); return SLURM_SUCCESS; unpack_error: @@ -4021,7 +4016,7 @@ _pack_checkpoint_comp(checkpoint_comp_msg_t *msg, Buf buffer) static int _unpack_checkpoint_comp(checkpoint_comp_msg_t **msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; checkpoint_comp_msg_t * msg; xassert ( msg_ptr != NULL ); @@ -4031,7 +4026,7 @@ _unpack_checkpoint_comp(checkpoint_comp_msg_t **msg_ptr, Buf buffer) safe_unpack32(& msg -> job_id , buffer ) ; safe_unpack32(& msg -> step_id , buffer ) ; safe_unpack32(& msg -> error_code , buffer ) ; - safe_unpackstr_xmalloc ( & msg -> error_msg, & uint16_tmp , buffer ) ; + safe_unpackstr_xmalloc ( & msg -> error_msg, & uint32_tmp , buffer ) ; safe_unpack_time ( & msg -> begin_time , buffer ) ; return SLURM_SUCCESS; @@ -4056,7 +4051,7 @@ static int _unpack_checkpoint_resp_msg(checkpoint_resp_msg_t **msg_ptr, Buf buffer) { checkpoint_resp_msg_t * msg; - uint16_t uint16_tmp; + uint32_t uint32_tmp; xassert ( msg_ptr != NULL ); msg = xmalloc ( sizeof (checkpoint_resp_msg_t) ) ; @@ -4064,7 +4059,7 @@ _unpack_checkpoint_resp_msg(checkpoint_resp_msg_t **msg_ptr, Buf buffer) safe_unpack_time ( & msg -> event_time, buffer ) ; safe_unpack32(& msg -> error_code , buffer ) ; - safe_unpackstr_xmalloc ( & msg -> error_msg, & uint16_tmp , buffer ) ; + safe_unpackstr_xmalloc ( & msg -> error_msg, & uint32_tmp , buffer ) ; return SLURM_SUCCESS; unpack_error: @@ -4103,7 +4098,7 @@ static void _pack_file_bcast(file_bcast_msg_t * msg , Buf buffer ) static int _unpack_file_bcast(file_bcast_msg_t ** msg_ptr , Buf buffer ) { int i; - uint16_t uint16_tmp; + uint32_t uint32_tmp; file_bcast_msg_t *msg ; xassert ( msg_ptr != NULL ); @@ -4122,11 +4117,11 @@ static int _unpack_file_bcast(file_bcast_msg_t ** msg_ptr , Buf buffer ) safe_unpack_time ( & msg->atime, buffer ); safe_unpack_time ( & msg->mtime, buffer ); - safe_unpackstr_xmalloc ( & msg->fname, &uint16_tmp, buffer ); + safe_unpackstr_xmalloc ( & msg->fname, &uint32_tmp, buffer ); for (i=0; i<FILE_BLOCKS; i++) { safe_unpack32 ( & msg->block_len[i], buffer ); - safe_unpackmem_xmalloc ( & msg->block[i], &uint16_tmp , buffer ) ; - if ( uint16_tmp != msg->block_len[i] ) + safe_unpackmem_xmalloc ( & msg->block[i], &uint32_tmp , buffer ) ; + if ( uint32_tmp != msg->block_len[i] ) goto unpack_error; } return SLURM_SUCCESS; @@ -4159,7 +4154,7 @@ static void _pack_trigger_msg(trigger_info_msg_t *msg , Buf buffer) static int _unpack_trigger_msg(trigger_info_msg_t ** msg_ptr , Buf buffer) { int i; - uint16_t uint16_tmp; + uint32_t uint32_tmp; trigger_info_msg_t *msg = xmalloc(sizeof(trigger_info_msg_t)); safe_unpack32 (&msg->record_count, buffer); @@ -4169,12 +4164,12 @@ static int _unpack_trigger_msg(trigger_info_msg_t ** msg_ptr , Buf buffer) safe_unpack32(&msg->trigger_array[i].trig_id, buffer); safe_unpack16(&msg->trigger_array[i].res_type, buffer); safe_unpackstr_xmalloc(&msg->trigger_array[i].res_id, - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpack16(&msg->trigger_array[i].trig_type, buffer); safe_unpack16(&msg->trigger_array[i].offset, buffer); safe_unpack32(&msg->trigger_array[i].user_id, buffer); safe_unpackstr_xmalloc(&msg->trigger_array[i].program, - &uint16_tmp, buffer); + &uint32_tmp, buffer); } *msg_ptr = msg; return SLURM_SUCCESS; @@ -4194,11 +4189,11 @@ static void _pack_kvs_host_rec(struct kvs_hosts *msg_ptr, Buf buffer) static int _unpack_kvs_host_rec(struct kvs_hosts *msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; safe_unpack16(&msg_ptr->task_id, buffer); safe_unpack16(&msg_ptr->port, buffer); - safe_unpackstr_xmalloc(&msg_ptr->hostname, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg_ptr->hostname, &uint32_tmp, buffer); return SLURM_SUCCESS; unpack_error: @@ -4219,21 +4214,21 @@ static void _pack_kvs_rec(struct kvs_comm *msg_ptr, Buf buffer) } static int _unpack_kvs_rec(struct kvs_comm **msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; int i; struct kvs_comm *msg; msg = xmalloc(sizeof(struct kvs_comm)); *msg_ptr = msg; - safe_unpackstr_xmalloc(&msg->kvs_name, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->kvs_name, &uint32_tmp, buffer); safe_unpack16(&msg->kvs_cnt, buffer); msg->kvs_keys = xmalloc(sizeof(char *) * msg->kvs_cnt); msg->kvs_values = xmalloc(sizeof(char *) * msg->kvs_cnt); for (i=0; i<msg->kvs_cnt; i++) { safe_unpackstr_xmalloc(&msg->kvs_keys[i], - &uint16_tmp, buffer); + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&msg->kvs_values[i], - &uint16_tmp, buffer); + &uint32_tmp, buffer); } return SLURM_SUCCESS; @@ -4308,7 +4303,7 @@ static void _pack_kvs_get(kvs_get_msg_t *msg_ptr, Buf buffer) static int _unpack_kvs_get(kvs_get_msg_t **msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; kvs_get_msg_t *msg; msg = xmalloc(sizeof(struct kvs_get_msg)); @@ -4316,7 +4311,7 @@ static int _unpack_kvs_get(kvs_get_msg_t **msg_ptr, Buf buffer) safe_unpack16(&msg->task_id, buffer); safe_unpack16(&msg->size, buffer); safe_unpack16(&msg->port, buffer); - safe_unpackstr_xmalloc(&msg->hostname, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->hostname, &uint32_tmp, buffer); return SLURM_SUCCESS; unpack_error: @@ -4412,7 +4407,7 @@ static void _pack_slurmd_status(slurmd_status_t *msg, Buf buffer) static int _unpack_slurmd_status(slurmd_status_t **msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; slurmd_status_t *msg; xassert(msg_ptr); @@ -4432,10 +4427,10 @@ static int _unpack_slurmd_status(slurmd_status_t **msg_ptr, Buf buffer) safe_unpack32(&msg->actual_tmp_disk, buffer); safe_unpack32(&msg->pid, buffer); - safe_unpackstr_xmalloc(&msg->hostname, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&msg->slurmd_logfile, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&msg->step_list, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&msg->version, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->hostname, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->slurmd_logfile, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->step_list, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->version, &uint32_tmp, buffer); *msg_ptr = msg; return SLURM_SUCCESS; @@ -4461,7 +4456,7 @@ static void _pack_job_notify(job_notify_msg_t *msg, Buf buffer) static int _unpack_job_notify(job_notify_msg_t **msg_ptr, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; job_notify_msg_t *msg; xassert(msg_ptr); @@ -4470,7 +4465,7 @@ static int _unpack_job_notify(job_notify_msg_t **msg_ptr, Buf buffer) safe_unpack32(&msg->job_id, buffer); safe_unpack32(&msg->job_step_id, buffer); - safe_unpackstr_xmalloc(&msg->message, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&msg->message, &uint32_tmp, buffer); *msg_ptr = msg; return SLURM_SUCCESS; @@ -4495,7 +4490,7 @@ unpack_error: int unpack_ ( ** msg_ptr , Buf buffer ) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; * msg ; xassert ( msg_ptr != NULL ); @@ -4506,7 +4501,7 @@ unpack_error: safe_unpack16( & msg -> , buffer ) ; safe_unpack32( & msg -> , buffer ) ; safe_unpack_time ( & msg -> , buffer ) ; - safe_unpackstr_xmalloc ( & msg -> x, & uint16_tmp , buffer ) ; + safe_unpackstr_xmalloc ( & msg -> x, & uint32_tmp , buffer ) ; return SLURM_SUCCESS; unpack_error: diff --git a/src/common/slurm_step_layout.c b/src/common/slurm_step_layout.c index e49e01dc443aa7cbc81fb2c34d86fb8f5401043f..ecf78a701c9d5fc990361b65e100dd9436cfb70f 100644 --- a/src/common/slurm_step_layout.c +++ b/src/common/slurm_step_layout.c @@ -88,7 +88,7 @@ static int _task_layout_hostfile(slurm_step_layout_t *step_layout, slurm_step_layout_t *slurm_step_layout_create( const char *tlist, uint32_t *cpus_per_node, uint32_t *cpu_count_reps, - uint16_t num_hosts, + uint32_t num_hosts, uint32_t num_tasks, uint16_t task_dist, uint16_t plane_size) @@ -154,7 +154,7 @@ slurm_step_layout_t *fake_slurm_step_layout_create( const char *tlist, uint32_t *cpus_per_node, uint32_t *cpu_count_reps, - uint16_t node_cnt, + uint32_t node_cnt, uint32_t task_cnt) { uint32_t cpn = 1; @@ -287,7 +287,7 @@ extern void pack_slurm_step_layout(slurm_step_layout_t *step_layout, if(!i) return; packstr(step_layout->node_list, buffer); - pack16(step_layout->node_cnt, buffer); + pack32(step_layout->node_cnt, buffer); pack32(step_layout->task_cnt, buffer); /* slurm_pack_slurm_addr_array(step_layout->node_addr, */ /* step_layout->node_cnt, buffer); */ @@ -301,7 +301,7 @@ extern void pack_slurm_step_layout(slurm_step_layout_t *step_layout, extern int unpack_slurm_step_layout(slurm_step_layout_t **layout, Buf buffer) { uint16_t uint16_tmp; - uint32_t num_tids; + uint32_t num_tids, uint32_tmp; slurm_step_layout_t *step_layout = NULL; int i; @@ -316,17 +316,17 @@ extern int unpack_slurm_step_layout(slurm_step_layout_t **layout, Buf buffer) step_layout->node_cnt = 0; step_layout->tids = NULL; step_layout->tasks = NULL; - safe_unpackstr_xmalloc(&step_layout->node_list, &uint16_tmp, buffer); - safe_unpack16(&step_layout->node_cnt, buffer); + safe_unpackstr_xmalloc(&step_layout->node_list, &uint32_tmp, buffer); + safe_unpack32(&step_layout->node_cnt, buffer); safe_unpack32(&step_layout->task_cnt, buffer); /* if (slurm_unpack_slurm_addr_array(&(step_layout->node_addr), */ -/* &uint16_tmp, buffer)) */ +/* &uint32_tmp, buffer)) */ /* goto unpack_error; */ -/* if (uint16_tmp != step_layout->node_cnt) */ +/* if (uint32_tmp != step_layout->node_cnt) */ /* goto unpack_error; */ - step_layout->tasks = xmalloc(sizeof(uint16_t) * step_layout->node_cnt); + step_layout->tasks = xmalloc(sizeof(uint32_t) * step_layout->node_cnt); step_layout->tids = xmalloc(sizeof(uint32_t *) * step_layout->node_cnt); for(i = 0; i < step_layout->node_cnt; i++) { @@ -415,7 +415,7 @@ static int _init_task_layout(slurm_step_layout_t *step_layout, i = hostlist_count(hl); if(step_layout->node_cnt > i) step_layout->node_cnt = i; - debug("laying out the %d tasks on %d hosts %s\n", + debug("laying out the %u tasks on %u hosts %s\n", step_layout->task_cnt, step_layout->node_cnt, step_layout->node_list); if(step_layout->node_cnt < 1) { diff --git a/src/common/slurm_step_layout.h b/src/common/slurm_step_layout.h index 2a03b6205fcf65f9fbd03af9be55aab0f70d20da..65b8fcfd2c0b6e0a6fd996c3787aa17bfe9e065d 100644 --- a/src/common/slurm_step_layout.h +++ b/src/common/slurm_step_layout.h @@ -63,7 +63,7 @@ extern slurm_step_layout_t *slurm_step_layout_create(const char *tlist, uint32_t *cpus_per_node, uint32_t *cpu_count_reps, - uint16_t node_cnt, + uint32_t node_cnt, uint32_t task_cnt, uint16_t task_dist, uint16_t plane_size); @@ -86,7 +86,7 @@ extern slurm_step_layout_t *fake_slurm_step_layout_create( const char *tlist, uint32_t *cpus_per_node, uint32_t *cpu_count_reps, - uint16_t node_cnt, + uint32_t node_cnt, uint32_t task_cnt); /* copys structure for step layout */ diff --git a/src/plugins/auth/authd/auth_authd.c b/src/plugins/auth/authd/auth_authd.c index afef1f77629e597f61c737cdc37c1eecc156fb5e..65f24e5930a1d5dbebedf01e668fad3288cc57d0 100644 --- a/src/plugins/auth/authd/auth_authd.c +++ b/src/plugins/auth/authd/auth_authd.c @@ -258,7 +258,7 @@ slurm_auth_pack( slurm_auth_credential_t *cred, Buf buf ) slurm_auth_credential_t * slurm_auth_unpack( Buf buf ) { - slurm_auth_credential_t *cred; + slurm_auth_credential_t *cred = NULL; uint16_t sig_size; /* ignored */ uint32_t version, tmpint; char *data; @@ -270,19 +270,13 @@ slurm_auth_unpack( Buf buf ) /* Check the plugin type. */ - if ( unpackmem_ptr( &data, &sig_size, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - return NULL; - } + safe_unpackmem_ptr( &data, &sig_size, buf ); if ( strcmp( data, plugin_type ) != 0 ) { plugin_errno = SLURM_AUTH_MISMATCH; return NULL; } - if ( unpack32( &version, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - return NULL; - } + safe_unpack32( &version, buf ); if( version != plugin_version ) { plugin_errno = SLURM_AUTH_MISMATCH; return NULL; @@ -293,33 +287,19 @@ slurm_auth_unpack( Buf buf ) xmalloc( sizeof( slurm_auth_credential_t ) ); cred->cr_errno = SLURM_SUCCESS; - if ( unpack32( &tmpint, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - goto unpack_error; - } + safe_unpack32( &tmpint, buf ); cred->cred.uid = tmpint; - if ( unpack32( &tmpint, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - goto unpack_error; - } + safe_unpack32( &tmpint, buf ); cred->cred.gid = tmpint; - if ( unpack_time( &cred->cred.valid_from, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - goto unpack_error; - } - if ( unpack_time( &cred->cred.valid_to, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - goto unpack_error; - } - if ( unpackmem_ptr( &data, &sig_size, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - goto unpack_error; - } + safe_unpack_time( &cred->cred.valid_from, buf ); + safe_unpack_time( &cred->cred.valid_to, buf ); + safe_unpackmem_ptr( &data, &sig_size, buf ); memcpy( cred->sig.data, data, sizeof( signature ) ); return cred; unpack_error: + plugin_errno = SLURM_AUTH_UNPACK; xfree( cred ); return NULL; } diff --git a/src/plugins/auth/munge/auth_munge.c b/src/plugins/auth/munge/auth_munge.c index e2ab14924597c4db6b77447561960293164f9f54..912b7e7425ca556eeadfc2442e90a45b51511abf 100644 --- a/src/plugins/auth/munge/auth_munge.c +++ b/src/plugins/auth/munge/auth_munge.c @@ -325,9 +325,9 @@ slurm_auth_pack( slurm_auth_credential_t *cred, Buf buf ) slurm_auth_credential_t * slurm_auth_unpack( Buf buf ) { - slurm_auth_credential_t *cred; + slurm_auth_credential_t *cred = NULL; char *type; - uint16_t size; + uint32_t size; uint32_t version; if ( buf == NULL ) { @@ -338,20 +338,14 @@ slurm_auth_unpack( Buf buf ) /* * Get the authentication type. */ - if ( unpackmem_ptr( &type, &size, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - return NULL; - } + safe_unpackmem_ptr( &type, &size, buf ); if (( type == NULL ) || ( strcmp( type, plugin_type ) != 0 )) { plugin_errno = SLURM_AUTH_MISMATCH; return NULL; } - if ( unpack32( &version, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK; - return NULL; - } + safe_unpack32( &version, buf ); if ( version != plugin_version ) { plugin_errno = SLURM_AUTH_MISMATCH; return NULL; @@ -367,13 +361,11 @@ slurm_auth_unpack( Buf buf ) xassert(cred->magic = MUNGE_MAGIC); - if (unpackstr_malloc(&cred->m_str, &size, buf) < 0) { - plugin_errno = SLURM_AUTH_UNPACK; - goto unpack_error; - } + safe_unpackstr_malloc(&cred->m_str, &size, buf); return cred; unpack_error: + plugin_errno = SLURM_AUTH_UNPACK; xfree( cred ); return NULL; } diff --git a/src/plugins/auth/none/auth_none.c b/src/plugins/auth/none/auth_none.c index 42a5579755763b4562abfce6428759c8e8020215..f46f7338a6f6a6d983a42b99614e92d42cb9e62f 100644 --- a/src/plugins/auth/none/auth_none.c +++ b/src/plugins/auth/none/auth_none.c @@ -144,9 +144,7 @@ static int plugin_errno = SLURM_SUCCESS; * the general ones. */ enum { - SLURM_AUTH_UNPACK_TYPE = SLURM_AUTH_FIRST_LOCAL_ERROR, - SLURM_AUTH_UNPACK_VERSION, - SLURM_AUTH_UNPACK_CRED + SLURM_AUTH_UNPACK }; /* @@ -276,11 +274,11 @@ slurm_auth_pack( slurm_auth_credential_t *cred, Buf buf ) slurm_auth_credential_t * slurm_auth_unpack( Buf buf ) { - slurm_auth_credential_t *cred; + slurm_auth_credential_t *cred = NULL; char *tmpstr; uint32_t tmpint; uint32_t version; - uint16_t size; + uint32_t size; if ( buf == NULL ) { plugin_errno = SLURM_AUTH_BADARG; @@ -290,19 +288,13 @@ slurm_auth_unpack( Buf buf ) /* * Get the authentication type. */ - if ( unpackmem_ptr( &tmpstr, &size, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK_TYPE; - return NULL; - } + safe_unpackmem_ptr( &tmpstr, &size, buf ); if (( tmpstr == NULL ) || ( strcmp( tmpstr, plugin_type ) != 0 )) { plugin_errno = SLURM_AUTH_MISMATCH; return NULL; } - if ( unpack32( &version, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK_VERSION; - return NULL; - } + safe_unpack32( &version, buf ); if ( version != plugin_version ) { plugin_errno = SLURM_AUTH_MISMATCH; return NULL; @@ -321,20 +313,17 @@ slurm_auth_unpack( Buf buf ) * clobbering if they really aren't. This technique ensures a * warning at compile time if the sizes are incompatible. */ - if ( unpack32( &tmpint, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK_CRED; - xfree( cred ); - return NULL; - } + safe_unpack32( &tmpint, buf ); cred->uid = tmpint; - if ( unpack32( &tmpint, buf ) != SLURM_SUCCESS ) { - plugin_errno = SLURM_AUTH_UNPACK_CRED; - xfree( cred ); - return NULL; - } + safe_unpack32( &tmpint, buf ); cred->gid = tmpint; return cred; + + unpack_error: + plugin_errno = SLURM_AUTH_UNPACK; + xfree( cred ); + return NULL; } /* @@ -386,9 +375,7 @@ slurm_auth_errstr( int slurm_errno ) int err; char *msg; } tbl[] = { - { SLURM_AUTH_UNPACK_TYPE, "cannot unpack authentication type" }, - { SLURM_AUTH_UNPACK_VERSION, "cannot unpack credential version" }, - { SLURM_AUTH_UNPACK_CRED, "cannot unpack credential" }, + { SLURM_AUTH_UNPACK, "cannot unpack credential" }, { 0, NULL } }; diff --git a/src/plugins/checkpoint/ompi/checkpoint_ompi.c b/src/plugins/checkpoint/ompi/checkpoint_ompi.c index 7f344cff8f1de3907141e50915c2db95347fb7a7..cdc717873930ed3df239896f7458590ea7f5f286 100644 --- a/src/plugins/checkpoint/ompi/checkpoint_ompi.c +++ b/src/plugins/checkpoint/ompi/checkpoint_ompi.c @@ -257,7 +257,7 @@ extern int slurm_ckpt_pack_job(check_jobinfo_t jobinfo, Buf buffer) extern int slurm_ckpt_unpack_job(check_jobinfo_t jobinfo, Buf buffer) { - uint16_t uint16_tmp; + uint32_t uint32_tmp; struct check_job_info *check_ptr = (struct check_job_info *)jobinfo; @@ -266,7 +266,7 @@ extern int slurm_ckpt_unpack_job(check_jobinfo_t jobinfo, Buf buffer) safe_unpack16(&check_ptr->wait_time, buffer); safe_unpack32(&check_ptr->error_code, buffer); - safe_unpackstr_xmalloc(&check_ptr->error_msg, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&check_ptr->error_msg, &uint32_tmp, buffer); safe_unpack_time(&check_ptr->time_stamp, buffer); return SLURM_SUCCESS; diff --git a/src/plugins/select/bluegene/plugin/select_bluegene.c b/src/plugins/select/bluegene/plugin/select_bluegene.c index b9bd90272f2eae3c1cb16fe97b37ee93140443f8..ec3cdc36cd1fcfe67012700e6a18247ec27100ea 100644 --- a/src/plugins/select/bluegene/plugin/select_bluegene.c +++ b/src/plugins/select/bluegene/plugin/select_bluegene.c @@ -337,7 +337,7 @@ extern int select_p_state_restore(char *dir_name) List results = NULL; int data_allocated, data_read = 0; char *ver_str = NULL; - uint16_t ver_str_len; + uint32_t ver_str_len; struct passwd *pw_ent = NULL; int blocks = 0; diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index 4a9cabe615e1a33f6d29df07f6403f4b2bf7edfa..16634369da061b718f79871120a3672b251e7033 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -81,13 +81,15 @@ int compute_c_b_task_dist(struct select_cr_job *job) over_subscribe = true; if (last_taskid == taskid) { /* avoid infinite loop */ - fatal("compute_c_b_task_dist failure"); + error("compute_c_b_task_dist failure"); + abort(); } } #if (CR_DEBUG) for (i = 0; i < job->nhosts; i++) { - info("cons_res _c_b_task_dist %u host %s nprocs %u maxtasks %u cpus %u alloc_cpus %u", + info("cons_res _c_b_task_dist %u host %s nprocs %u " + "maxtasks %u cpus %u alloc_cpus %u", job->job_id, job->host[i], job->nprocs, maxtasks, job->cpus[i], job->alloc_cpus[i]); } @@ -107,11 +109,13 @@ int _find_offset(struct select_cr_job *job, const int job_index, uint16_t acores, asockets, freecpus, last_freecpus = 0; p_ptr = get_cr_part_ptr(this_cr_node, job->partition); - if (p_ptr == NULL) + if (p_ptr == NULL) { /* this should never happen, because p_ptr */ /* exists in the callers of this function */ - fatal("cons_res: find_offset: could not find part %s", + error("cons_res: find_offset: could not find part %s", job->partition); + abort(); + } index = -1; for (i = 0; i < p_ptr->num_rows; i++) { @@ -132,14 +136,14 @@ int _find_offset(struct select_cr_job *job, const int job_index, asockets++; } /* make sure we have the required number of usable sockets */ - if (skip && (sockets - skip) < job->min_sockets) + if (skip && ((sockets - skip) < job->min_sockets)) continue; /* CR_SOCKET needs UNALLOCATED sockets */ - if (cr_type == CR_SOCKET || cr_type == CR_SOCKET_MEMORY) { + if ((cr_type == CR_SOCKET) || (cr_type == CR_SOCKET_MEMORY)) { if (sockets - asockets < job->min_sockets) continue; } - + freecpus = (cores * sockets) - acores; if (freecpus < maxcores) continue; @@ -153,9 +157,11 @@ int _find_offset(struct select_cr_job *job, const int job_index, last_freecpus = freecpus; } } - if (index < 0) - fatal("job_assign_task: failure in computing offset"); - + if (index < 0) { + error("job_assign_task: failure in computing offset"); + abort(); + } + return index * this_cr_node->num_sockets; } @@ -177,11 +183,13 @@ void _job_assign_tasks(struct select_cr_job *job, struct part_cr_record *p_ptr; p_ptr = get_cr_part_ptr(this_cr_node, job->partition); - if (p_ptr == NULL) + if (p_ptr == NULL) { /* this should never happen, because p_ptr */ /* exists in the callers of this function */ - fatal("cons_res: assign_tasks: could not find part %s", + error("cons_res: assign_tasks: could not find part %s", job->partition); + abort(); + } /* get hardware info for this node */ get_resources_this_node(&cpus, &sockets, &cores, &threads, @@ -286,7 +294,8 @@ void _job_assign_tasks(struct select_cr_job *job, } if (last_corecount == corecount) { /* Avoid possible infinite loop on error */ - fatal("_job_assign_tasks failure"); + error("_job_assign_tasks failure"); + abort(); } } } else { @@ -302,7 +311,8 @@ void _job_assign_tasks(struct select_cr_job *job, } if (last_corecount == corecount) { /* Avoid possible infinite loop on error */ - fatal("_job_assign_tasks failure"); + error("_job_assign_tasks failure"); + abort(); } } } @@ -458,7 +468,7 @@ int cr_plane_dist(struct select_cr_job *job, const select_type_plugin_info_t cr_type) { uint32_t maxtasks = job->nprocs; - uint16_t num_hosts = job->nhosts; + uint32_t num_hosts = job->nhosts; int i, j, k, host_index, cr_cpu = 0; uint32_t taskcount = 0, last_taskcount; int job_index = -1; @@ -490,7 +500,8 @@ int cr_plane_dist(struct select_cr_job *job, } if (last_taskcount == taskcount) { /* avoid possible infinite loop on error */ - fatal("cr_plane_dist failure"); + error("cr_plane_dist failure"); + abort(); } } diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index a1b8293d0b9f8102230c52e8fbef2f37beb34fc3..688b7aab7b8d4bc8e63b1be5f3907842fa1cf5b9 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -1147,12 +1147,12 @@ static int _cr_read_state_buffer(int fd, char **data_p, int *data_size_p) static int _cr_pack_job(struct select_cr_job *job, Buf buffer) { int i; - uint16_t nhosts = job->nhosts; + uint32_t nhosts = job->nhosts; pack32(job->job_id, buffer); pack16(job->state, buffer); pack32(job->nprocs, buffer); - pack16(job->nhosts, buffer); + pack32(job->nhosts, buffer); pack16(job->node_req, buffer); packstr_array(job->host, nhosts, buffer); @@ -1189,30 +1189,30 @@ static int _cr_pack_job(struct select_cr_job *job, Buf buffer) static int _cr_unpack_job(struct select_cr_job *job, Buf buffer) { int i; - uint16_t len16, have_alloc_cores; + uint16_t have_alloc_cores; uint32_t len32; - int32_t nhosts = 0; + uint32_t nhosts = 0; char *bit_fmt = NULL; uint16_t bit_cnt; safe_unpack32(&job->job_id, buffer); safe_unpack16(&job->state, buffer); safe_unpack32(&job->nprocs, buffer); - safe_unpack16(&job->nhosts, buffer); + safe_unpack32(&job->nhosts, buffer); safe_unpack16(&bit_cnt, buffer); nhosts = job->nhosts; job->node_req = bit_cnt; - safe_unpackstr_array(&job->host, &len16, buffer); - if (len16 != nhosts) { + safe_unpackstr_array(&job->host, &len32, buffer); + if (len32 != nhosts) { error("cons_res unpack_job: expected %u hosts, saw %u", - nhosts, len16); + nhosts, len32); goto unpack_error; } safe_unpack16_array(&job->cpus, &len32, buffer); safe_unpack16_array(&job->alloc_cpus, &len32, buffer); - safe_unpackstr_xmalloc(&job->partition, &len16, buffer); + safe_unpackstr_xmalloc(&job->partition, &len32, buffer); safe_unpack16_array(&job->node_offset, &len32, buffer); safe_unpack16(&have_alloc_cores, buffer); @@ -1239,7 +1239,7 @@ static int _cr_unpack_job(struct select_cr_job *job, Buf buffer) safe_unpack16(&job->min_cores, buffer); safe_unpack16(&job->min_threads, buffer); - safe_unpackstr_xmalloc(&bit_fmt, &len16, buffer); + safe_unpackstr_xmalloc(&bit_fmt, &len32, buffer); safe_unpack16(&bit_cnt, buffer); if (bit_fmt) { job->node_bitmap = bit_alloc(bit_cnt); @@ -1422,7 +1422,7 @@ extern int select_p_state_restore(char *dir_name) char *file_name = NULL; struct select_cr_job *job; Buf buffer = NULL; - uint16_t len16; + uint32_t len32; char *data = NULL; int data_size = 0; char *restore_plugin_type = NULL; @@ -1463,7 +1463,7 @@ extern int select_p_state_restore(char *dir_name) data = NULL; /* now in buffer, don't xfree() */ /*** retrieve the plugin type ***/ - safe_unpackstr_xmalloc(&restore_plugin_type, &len16, buffer); + safe_unpackstr_xmalloc(&restore_plugin_type, &len32, buffer); safe_unpack32(&restore_plugin_version, buffer); safe_unpack16(&restore_plugin_crtype, buffer); safe_unpack32(&restore_pstate_version, buffer); @@ -1525,7 +1525,7 @@ extern int select_p_state_restore(char *dir_name) for (i = 0; i < prev_select_node_cnt; i++) { /*** don't restore prev_select_node_ptr[i].node_ptr ***/ safe_unpackstr_xmalloc(&(prev_select_node_ptr[i].name), - &len16, buffer); + &len32, buffer); safe_unpack16(&prev_select_node_ptr[i].num_sockets, buffer); prev_select_node_ptr[i].node_ptr = NULL; prev_select_node_ptr[i].node_state = NODE_CR_AVAILABLE; diff --git a/src/plugins/select/cons_res/select_cons_res.h b/src/plugins/select/cons_res/select_cons_res.h index 1e9fd82896b6864cba6b2a539b62ac2c528f036f..f49ccb87937121852578b592539235ee6833947e 100644 --- a/src/plugins/select/cons_res/select_cons_res.h +++ b/src/plugins/select/cons_res/select_cons_res.h @@ -41,6 +41,7 @@ #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> #include <slurm/slurm.h> #include <slurm/slurm_errno.h> @@ -134,7 +135,7 @@ struct select_cr_job { uint32_t job_id; /* job ID, default set by SLURM */ uint16_t state; /* job state information */ uint32_t nprocs; /* --nprocs=n, -n n */ - uint16_t nhosts; /* number of hosts allocated to job */ + uint32_t nhosts; /* number of hosts allocated to job */ char **host; /* hostname vector */ uint16_t *cpus; /* number of processors on each host, * if using Moab scheduler (sched/wiki2) diff --git a/src/plugins/switch/federation/federation.c b/src/plugins/switch/federation/federation.c index de6c8330125ac7608984d3d80747c2a50944d6fb..bafdf74d8508f82077b0ee8784cf2f5c88675a3f 100644 --- a/src/plugins/switch/federation/federation.c +++ b/src/plugins/switch/federation/federation.c @@ -1134,7 +1134,7 @@ static int _fake_unpack_adapters(Buf buf) safe_unpack32(&adapter_count, buf); for (i = 0; i < adapter_count; i++) { /* no copy, just advances buf counters */ - unpackmem_ptr(&dummyptr, &dummy16, buf); + safe_unpackmem_ptr(&dummyptr, &dummy16, buf); if (dummy16 != FED_ADAPTERNAME_LEN) goto unpack_error; safe_unpack16(&dummy16, buf); @@ -1186,7 +1186,7 @@ _unpack_nodeinfo(fed_nodeinfo_t *n, Buf buf, bool believe_window_status) safe_unpack32(&magic, buf); if(magic != FED_NODEINFO_MAGIC) slurm_seterrno_ret(EBADMAGIC_FEDNODEINFO); - unpackmem_ptr(&name_ptr, &size, buf); + safe_unpackmem_ptr(&name_ptr, &size, buf); if(size != FED_HOSTLEN) goto unpack_error; memcpy(name, name_ptr, size); @@ -1234,7 +1234,7 @@ _unpack_nodeinfo(fed_nodeinfo_t *n, Buf buf, bool believe_window_status) safe_unpack32(&tmp_n->adapter_count, buf); for(i = 0; i < tmp_n->adapter_count; i++) { tmp_a = tmp_n->adapter_list + i; - unpackmem_ptr(&name_ptr, &size, buf); + safe_unpackmem_ptr(&name_ptr, &size, buf); if(size != FED_ADAPTERNAME_LEN) goto unpack_error; memcpy(tmp_a->name, name_ptr, size); @@ -1978,7 +1978,7 @@ _unpack_tableinfo(fed_tableinfo_t *tableinfo, Buf buf) safe_unpack16(&tableinfo->table[i]->lid, buf); safe_unpack16(&tableinfo->table[i]->window_id, buf); } - unpackmem_ptr(&name_ptr, &size, buf); + safe_unpackmem_ptr(&name_ptr, &size, buf); if (size != FED_ADAPTERNAME_LEN) goto unpack_error; memcpy(tableinfo->adapter_name, name_ptr, size); @@ -2003,7 +2003,7 @@ fed_unpack_jobinfo(fed_jobinfo_t *j, Buf buf) safe_unpack32(&j->magic, buf); assert(j->magic == FED_JOBINFO_MAGIC); safe_unpack16(&j->job_key, buf); - unpackmem(j->job_desc, &size, buf); + safe_unpackmem(j->job_desc, &size, buf); if(size != DESCLEN) goto unpack_error; safe_unpack32(&j->window_memory, buf); diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index ce91288fd332ee00a3345b16c52ca9f2b80c48af..97e3bed81ff58d9a828740caf71a42b896b7598d 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -134,7 +134,7 @@ static void _pack_pending_job_details(struct job_details *detail_ptr, static int _purge_job_record(uint32_t job_id); static void _purge_lost_batch_jobs(int node_inx, time_t now); static void _read_data_array_from_file(char *file_name, char ***data, - uint16_t * size); + uint32_t * size); static void _read_data_from_file(char *file_name, char **data); static void _remove_defunct_batch_dirs(List batch_dirs); static int _reset_detail_bitmaps(struct job_record *job_ptr); @@ -153,7 +153,7 @@ static int _validate_job_desc(job_desc_msg_t * job_desc_msg, int allocate, static void _validate_job_files(List batch_dirs); static int _write_data_to_file(char *file_name, char *data); static int _write_data_array_to_file(char *file_name, char **data, - uint16_t size); + uint32_t size); static void _xmit_new_end_time(struct job_record *job_ptr); /* @@ -367,7 +367,7 @@ extern int load_all_job_state(void) time_t buf_time; uint32_t saved_job_id; char *ver_str = NULL; - uint16_t ver_str_len; + uint32_t ver_str_len; /* read the file */ state_file = xstrdup(slurmctld_conf.state_save_location); @@ -550,10 +550,10 @@ static void _dump_job_state(struct job_record *dump_job_ptr, Buf buffer) static int _load_job_state(Buf buffer) { uint32_t job_id, user_id, group_id, time_limit, priority, alloc_sid; - uint32_t exit_code, num_procs, db_index; + uint32_t exit_code, num_procs, db_index, name_len; time_t start_time, end_time, suspend_time, pre_sus_time; uint16_t job_state, next_step_id, details, batch_flag, step_flag; - uint16_t kill_on_node_fail, kill_on_step_done, name_len; + uint16_t kill_on_node_fail, kill_on_step_done; uint16_t alloc_resp_port, other_port, mail_type, state_reason; char *nodes = NULL, *partition = NULL, *name = NULL, *resp_host = NULL; char *account = NULL, *network = NULL, *mail_user = NULL; @@ -795,9 +795,9 @@ static int _load_job_details(struct job_record *job_ptr, Buf buffer) uint32_t min_nodes, max_nodes; uint32_t job_min_procs, total_procs; uint32_t job_min_memory, job_max_memory, job_min_tmp_disk; - uint32_t num_tasks; - uint16_t argc = 0, shared, contiguous, ntasks_per_node; - uint16_t cpus_per_task, name_len, no_requeue, overcommit; + uint32_t num_tasks, name_len, argc = 0; + uint16_t shared, contiguous, ntasks_per_node; + uint16_t cpus_per_task, no_requeue, overcommit; time_t begin_time, submit_time; int i; multi_core_data_t *mc_ptr; @@ -2077,7 +2077,7 @@ _copy_job_desc_to_file(job_desc_msg_t * job_desc, uint32_t job_id) * IN size - number of elements in data */ static int -_write_data_array_to_file(char *file_name, char **data, uint16_t size) +_write_data_array_to_file(char *file_name, char **data, uint32_t size) { int fd, i, pos, nwrite, amount; @@ -2087,8 +2087,8 @@ _write_data_array_to_file(char *file_name, char **data, uint16_t size) return ESLURM_WRITING_TO_FILE; } - amount = write(fd, &size, sizeof(uint16_t)); - if (amount < sizeof(uint16_t)) { + amount = write(fd, &size, sizeof(uint32_t)); + if (amount < sizeof(uint32_t)) { error("Error writing file %s, %m", file_name); close(fd); return ESLURM_WRITING_TO_FILE; @@ -2161,7 +2161,7 @@ static int _write_data_to_file(char *file_name, char *data) * RET point to array of string pointers containing environment variables * NOTE: READ lock_slurmctld config before entry */ -char **get_job_env(struct job_record *job_ptr, uint16_t * env_size) +char **get_job_env(struct job_record *job_ptr, uint32_t * env_size) { char job_dir[30], *file_name, **environment = NULL; @@ -2204,11 +2204,11 @@ char *get_job_script(struct job_record *job_ptr) * NOTE: The output format of this must be identical with _xduparray2() */ static void -_read_data_array_from_file(char *file_name, char ***data, uint16_t * size) +_read_data_array_from_file(char *file_name, char ***data, uint32_t * size) { int fd, pos, buf_size, amount, i; char *buffer, **array_ptr; - uint16_t rec_cnt; + uint32_t rec_cnt; xassert(file_name); xassert(data); @@ -2222,8 +2222,8 @@ _read_data_array_from_file(char *file_name, char ***data, uint16_t * size) return; } - amount = read(fd, &rec_cnt, sizeof(uint16_t)); - if (amount < sizeof(uint16_t)) { + amount = read(fd, &rec_cnt, sizeof(uint32_t)); + if (amount < sizeof(uint32_t)) { if (amount != 0) /* incomplete write */ error("Error reading file %s, %m", file_name); else diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 5cba31984bfa0e7bc8b126f1ec550fed039338d1..13e044d912c552d4ff742c48322f9888f8f64fde 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -402,15 +402,15 @@ extern int load_all_node_state ( bool state_only ) { char *node_name, *reason = NULL, *data = NULL, *state_file, *features; int data_allocated, data_read = 0, error_code = 0, node_cnt = 0; - uint16_t node_state, name_len; + uint16_t node_state; uint16_t cpus = 1, sockets = 1, cores = 1, threads = 1; - uint32_t real_memory, tmp_disk, data_size = 0; + uint32_t real_memory, tmp_disk, data_size = 0, name_len; struct node_record *node_ptr; int state_fd; time_t time_stamp, now = time(NULL); Buf buffer; char *ver_str = NULL; - uint16_t ver_str_len; + uint32_t ver_str_len; /* read the file */ state_file = xstrdup (slurmctld_conf.state_save_location); diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index a51263c76b868340c089b96f639c97c3bc89e0ef..29f8793b168343121c3d047ab8cf32707f5e6bbd 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -389,10 +389,10 @@ int load_all_part_state(void) char *part_name, *allow_groups, *nodes, *state_file, *data = NULL; uint32_t max_time, max_nodes, min_nodes; time_t time; - uint16_t name_len, def_part_flag, hidden, root_only; + uint16_t def_part_flag, hidden, root_only; uint16_t max_share, priority, state_up; struct part_record *part_ptr; - uint32_t data_size = 0; + uint32_t data_size = 0, name_len; int data_allocated, data_read = 0, error_code = 0, part_cnt = 0; int state_fd; Buf buffer; diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index f8ffb35c2785613e88b0a0dbe25bda8bf9bfcf89..f2ed12e50b0aac7502cb45c4943311c488b2feb4 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -648,7 +648,7 @@ extern struct part_record *find_part_record (char *name); * OUT env_size - number of elements to read * RET point to array of string pointers containing environment variables */ -extern char **get_job_env (struct job_record *job_ptr, uint16_t *env_size); +extern char **get_job_env (struct job_record *job_ptr, uint32_t *env_size); /* * get_job_script - return the script for a given job diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index b2b4f29aadfa01cfdc390073793099ae8f059669..747d4ec2b621b2050db857f21c52ec71b3cb80ba 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -1584,9 +1584,9 @@ extern void dump_job_step_state(struct step_record *step_ptr, Buf buffer) extern int load_step_state(struct job_record *job_ptr, Buf buffer) { struct step_record *step_ptr = NULL; - uint16_t step_id, cyclic_alloc, name_len, port, batch_step, bit_cnt; + uint16_t step_id, cyclic_alloc, port, batch_step, bit_cnt; uint16_t ckpt_interval; - uint32_t exit_code; + uint32_t exit_code, name_len; time_t start_time, pre_sus_time, ckpt_time; char *host = NULL; char *name = NULL, *network = NULL, *bit_fmt = NULL; diff --git a/src/slurmctld/trigger_mgr.c b/src/slurmctld/trigger_mgr.c index f3eaef6d87da7fa0ee53688f56ef6b0354caa941..75ef10c7246cbf2cb9e7b9e276929f976aff3d86 100644 --- a/src/slurmctld/trigger_mgr.c +++ b/src/slurmctld/trigger_mgr.c @@ -424,7 +424,7 @@ static void _dump_trigger_state(trig_mgr_info_t *trig_ptr, Buf buffer) static int _load_trigger_state(Buf buffer) { trig_mgr_info_t *trig_ptr; - uint16_t str_len; + uint32_t str_len; trig_ptr = xmalloc(sizeof(trig_mgr_info_t)); safe_unpack32 (&trig_ptr->trig_id, buffer); @@ -564,7 +564,7 @@ extern int trigger_state_restore(void) Buf buffer; time_t buf_time; char *ver_str = NULL; - uint16_t ver_str_len; + uint32_t ver_str_len; /* read the file */ state_file = xstrdup(slurmctld_conf.state_save_location); diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index 8894a9058f20f185d2a8850b905f977efaf26b1e..a8459eb70882a879504d56a8a8924f03d5a1b903 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -60,17 +60,17 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) { - uint16_t uint16_tmp; uint32_t uint32_tmp; - safe_unpackstr_xmalloc(&conf->hostname, &uint16_tmp, buffer); + + safe_unpackstr_xmalloc(&conf->hostname, &uint32_tmp, buffer); safe_unpack16(&conf->sockets, buffer); safe_unpack16(&conf->cores, buffer); safe_unpack16(&conf->threads, buffer); - safe_unpackstr_xmalloc(&conf->spooldir, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&conf->node_name, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&conf->logfile, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&conf->task_prolog, &uint16_tmp, buffer); - safe_unpackstr_xmalloc(&conf->task_epilog, &uint16_tmp, buffer); + safe_unpackstr_xmalloc(&conf->spooldir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&conf->node_name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&conf->logfile, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&conf->task_prolog, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&conf->task_epilog, &uint32_tmp, buffer); safe_unpack16(&conf->job_acct_gather_freq, buffer); safe_unpack16(&conf->propagate_prio, buffer); safe_unpack32(&uint32_tmp, buffer); diff --git a/testsuite/expect/test1.88 b/testsuite/expect/test1.88 index 0421283b6cfb969c9dd6dbfed2c36ce16061d140..7f6c68241e1ac501cbae946e872a2653262ecba6 100755 --- a/testsuite/expect/test1.88 +++ b/testsuite/expect/test1.88 @@ -176,7 +176,7 @@ if {[wait_for_file $file_out] == 0} { } } if {$matches == 0} { - send_user "\nFAILURE: No MPI communications occured\n" + send_user "\nFAILURE: No MPI communications occurred\n" send_user " The version of MPI you are using may be incompatible " send_user "with the configured switch\n" send_user " Core files may be present from failed MPI tasks\n\n" diff --git a/testsuite/expect/test7.2 b/testsuite/expect/test7.2 index 6125daf8746b6ee800bae888a068a16c128e3d41..d8ca2079d28d604baea06a75412d02f08e3af96e 100755 --- a/testsuite/expect/test7.2 +++ b/testsuite/expect/test7.2 @@ -73,12 +73,12 @@ set timeout [expr $max_job_delay + 60] set srun_pid [spawn $srun -l -N$node_cnt -n$task_cnt -O -t1 --threads=1 $file_prog_get] expect { -re "FAILURE" { - send_user "\nFAILURE: some error occured\n" + send_user "\nFAILURE: some error occurred\n" set exit_code 1 exp_continue } -re "error" { - send_user "\nFAILURE: some error occured\n" + send_user "\nFAILURE: some error occurred\n" set exit_code 1 exp_continue }