diff --git a/.ci/pytorch/test.sh b/.ci/pytorch/test.sh index 39c2c353f841..ff1558a8312c 100755 --- a/.ci/pytorch/test.sh +++ b/.ci/pytorch/test.sh @@ -140,7 +140,7 @@ fi # ASAN test is not working if [[ "$BUILD_ENVIRONMENT" == *asan* ]]; then export ASAN_OPTIONS=detect_leaks=0:symbolize=1:detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=1:detect_container_overflow=0:check_initialization_order=true:debug=true - export UBSAN_OPTIONS=print_stacktrace=1 + export UBSAN_OPTIONS=print_stacktrace=1:suppressions=$PWD/ubsan.supp export PYTORCH_TEST_WITH_ASAN=1 export PYTORCH_TEST_WITH_UBSAN=1 # TODO: Figure out how to avoid hard-coding these paths diff --git a/third_party/pybind11 b/third_party/pybind11 index 80dc998efced..5b0a6fc2017f 160000 --- a/third_party/pybind11 +++ b/third_party/pybind11 @@ -1 +1 @@ -Subproject commit 80dc998efced8ceb2be59756668a7e90e8bef917 +Subproject commit 5b0a6fc2017fcc176545afe3e09c9f9885283242 diff --git a/torch/csrc/distributed/rpc/py_rref.cpp b/torch/csrc/distributed/rpc/py_rref.cpp index 447e04612bd7..ed7847a1f5fa 100644 --- a/torch/csrc/distributed/rpc/py_rref.cpp +++ b/torch/csrc/distributed/rpc/py_rref.cpp @@ -141,6 +141,7 @@ PyRRef::PyRRef(const py::object& value, const py::object& type_hint) PyRRef::~PyRRef() { if (type_.has_value()) { + pybind11::gil_scoped_acquire ag; (*type_).dec_ref(); // explicitly setting PyObject* to nullptr to prevent py::object's dtor to // decref on the PyObject again. diff --git a/ubsan.supp b/ubsan.supp new file mode 100644 index 000000000000..2ffeb6cb5fe6 --- /dev/null +++ b/ubsan.supp @@ -0,0 +1 @@ +vptr:pybind11::detail::translate_exception \ No newline at end of file