Fixed SHMEM_SYMMETRIC_SIZE#1216
Conversation
|
Hi @markbrown314, apologies for the tag. |
|
Thanks! I will take a look at as soon as I can. |
There was a problem hiding this comment.
Thanks for the commit. Please clean up the commit message. Here is an example you can use:
Improved SHMEM_SYMMETRIC_SIZE Validation
Issue #1185
If SHMEM_SYMMETRIC_SIZE contains invalid characters, return error.
Signed-off by: Your Real Name <email address>
It would be best if your signed off name be your real name rather than a pseudonym. As well as the Author Name (user.name git config).
src/shmem_env.c
Outdated
|
|
||
| n = sscanf(str, "%lf%c", &p, &f); | ||
| if (2 == sscanf(str, "%lf%c%n", &p, &f, &n)) { | ||
| if (str[n] != '\0') { exit(1); } |
There was a problem hiding this comment.
You need to return 1 rather than exit(1)
When the atol_scaled() returns a non-zero value it prints "Invalid size in environment variable" to user. Exit will just shut it down abruptly.
9d4acf4 to
3a241fd
Compare
Issue Sandia-OpenSHMEM#1185 If SHMEM_SYMMETRIC_SIZE contains invalid characters, return error. Signed-off-by: Kitibodee Phuphanwoe <kitibodee.ph@ksu.ac.th>
3a241fd to
389f4f8
Compare
|
The previous one was mistyped. I forgot to use |
markbrown314
left a comment
There was a problem hiding this comment.
This looks good. 🎉 Thank you for the PR.
i inspired by OpenMPI
#1185