Skip to content

Commit

Permalink
Fix nullptr dereference in NvmlState (#319)
Browse files Browse the repository at this point in the history
Fixes a bug where `NvmlState` was dereferencing a `nullptr` when `libnvidia-ml.so.1` is not available.

Authors:
  - Christopher Harris (https://github.com/cwharris)

Approvers:
  - Devin Robison (https://github.com/drobison00)

URL: #319
  • Loading branch information
cwharris authored Apr 14, 2023
1 parent 810a7a6 commit b207fd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ci/conda/recipes/run_conda_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ fi
# Choose default variants
if hasArg quick; then
# For quick build, just do most recent version of rapids
CONDA_ARGS_ARRAY+=("rapids_version: 23.02}")
CONDA_ARGS_ARRAY+=("--variants" "{rapids_version: 23.02}")
fi

# And default channels
Expand Down
5 changes: 4 additions & 1 deletion cpp/mrc/src/internal/system/device_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ struct NvmlState
}
~NvmlState()
{
MRC_CHECK_NVML(m_nvml_handle->nvmlShutdown());
if (m_nvml_handle)
{
MRC_CHECK_NVML(m_nvml_handle->nvmlShutdown());
}
}

NvmlHandle& get_handle()
Expand Down
2 changes: 1 addition & 1 deletion python/mrc/_pymrc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# the License.
# =============================================================================

find_package(Python 3.10 REQUIRED COMPONENTS Development Interpreter)
find_package(Python 3.8 REQUIRED COMPONENTS Development Interpreter)
find_package(pybind11 REQUIRED)
find_package(prometheus-cpp REQUIRED)

Expand Down

0 comments on commit b207fd6

Please sign in to comment.