1
1

We need to check the value of {{{opal_crs_base_metadata_read_token}}} since it may segv if we have a malformed metadata file.

Bug found by Sergio Diaz Montes:
  http://www.open-mpi.org/community/lists/users/2009/11/11176.php

This commit was SVN r22290.
Этот коммит содержится в:
Josh Hursey 2009-12-09 18:41:56 +00:00
родитель 4357159ac9
Коммит 6e584c151f
3 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -893,6 +893,13 @@ static int blcr_cold_start(opal_crs_blcr_snapshot_t *snapshot) {
* Context Filename
*/
opal_crs_base_metadata_read_token(snapshot->super.local_location, CRS_METADATA_CONTEXT, &tmp_argv);
if( NULL == tmp_argv ) {
opal_output(mca_crs_blcr_component.super.output_handle,
"crs:blcr: blcr_cold_start: Error: Failed to read the %s token from the local checkpoint in %s",
CRS_METADATA_CONTEXT, snapshot->super.local_location);
exit_status = OPAL_ERROR;
goto cleanup;
}
asprintf(&snapshot->context_filename, "%s/%s", snapshot->super.local_location, tmp_argv[0]);
/*

Просмотреть файл

@ -95,6 +95,12 @@ int opal_crs_none_restart(opal_crs_base_snapshot_t *base_snapshot, bool spawn_ch
*child_pid = getpid();
opal_crs_base_metadata_read_token(base_snapshot->local_location, CRS_METADATA_CONTEXT, &tmp_argv);
if( NULL == tmp_argv ) {
opal_output(opal_crs_base_output,
"crs:none: none_restart: Error: Failed to read the %s token from the local checkpoint in %s",
CRS_METADATA_CONTEXT, base_snapshot->local_location);
return OPAL_ERROR;
}
if( opal_argv_count(tmp_argv) <= 0 ) {
opal_output_verbose(10, opal_crs_base_output,

Просмотреть файл

@ -703,6 +703,13 @@ static int self_cold_start(opal_crs_self_snapshot_t *snapshot) {
* JJH: Command lines limited to 256 chars.
*/
opal_crs_base_metadata_read_token(snapshot->super.local_location, CRS_METADATA_CONTEXT, &tmp_argv);
if( NULL == tmp_argv ) {
opal_output(mca_crs_self_component.super.output_handle,
"crs:self: self_cold_start: Error: Failed to read the %s token from the local checkpoint in %s",
CRS_METADATA_CONTEXT, snapshot->super.local_location);
exit_status = OPAL_ERROR;
goto cleanup;
}
asprintf(&snapshot->cmd_line, "%s", tmp_argv[0]);
/*