Skip to content

Commit 09f5b16

Browse files
committed
mpirun: Fix crash when project disabled
Fix a crash when a project is disabled (or has no frameworks). opal_argv_split() will return NULL if the input string is an empty string, which will happen when the project is disabled. Handle that case explicitly. Signed-off-by: Brian Barrett <bbarrett@amazon.com>
1 parent afd23c9 commit 09f5b16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ompi/tools/mpirun/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ static void append_prefixes(char ***out, const char *in)
7777

7878
char **tokenized;
7979
tokenized = opal_argv_split(in, ' ');
80+
if (NULL == tokenized) {
81+
return;
82+
}
8083

8184
int count = opal_argv_count(*out);
8285
for (int i = 0; tokenized[i] != NULL; ++i) {

0 commit comments

Comments
 (0)