David Singleton
2014-10-23 23:03:35 UTC
We've seen slurmctld crashes due to negative job array indices. This
is a suggested
patch (against master 32a42a8) to catch them:
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -5351,6 +5351,8 @@ static bool _parse_array_tok(char *tok, bitstr_t
*array_bitmap, uint32_t max)
int i, first, last, step = 1;
first = strtol(tok, &end_ptr, 10);
+ if (first < 0)
+ return false;
if (end_ptr[0] == '-') {
last = strtol(end_ptr + 1, &end_ptr, 10);
if (end_ptr[0] == ':') {
Cheers
David
is a suggested
patch (against master 32a42a8) to catch them:
--- a/src/slurmctld/job_mgr.c
+++ b/src/slurmctld/job_mgr.c
@@ -5351,6 +5351,8 @@ static bool _parse_array_tok(char *tok, bitstr_t
*array_bitmap, uint32_t max)
int i, first, last, step = 1;
first = strtol(tok, &end_ptr, 10);
+ if (first < 0)
+ return false;
if (end_ptr[0] == '-') {
last = strtol(end_ptr + 1, &end_ptr, 10);
if (end_ptr[0] == ':') {
Cheers
David