Skip to content

Commit

Permalink
Upgrade Pybind submodule to 2.10.4 (pytorch#103989)
Browse files Browse the repository at this point in the history
This is not ready for review, this is to make sure asan is fixed.
Not sure what is the most effective way to track down the bad dec_ref within deploy yet.

The asan silencing is done to match this comment:
https://github.com/pytorch/pytorch/blob/1c79003b3c13c7bc47e5796e4451d6565121f3a0/test/test_cpp_extensions_jit.py#L749-L752

EDIT: since the final failing function is in libtorch_python.so, we would need to skip that whole lib (not ok). So now we're skipping based on the function name which should be restrictive enough to not hide any real bug.

Pull Request resolved: pytorch#103989
Approved by: https://github.com/malfet
  • Loading branch information
albanD authored and pytorchmergebot committed Jun 27, 2023
1 parent c98896b commit 1a8af15
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .ci/pytorch/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion third_party/pybind11
Submodule pybind11 updated 78 files
+19 −3 .github/ISSUE_TEMPLATE/bug-report.yml
+153 −13 .github/workflows/ci.yml
+6 −2 .github/workflows/configure.yml
+2 −0 .github/workflows/format.yml
+5 −1 .github/workflows/labeler.yml
+4 −4 .github/workflows/pip.yml
+2 −0 .github/workflows/upstream.yml
+1 −0 .gitignore
+17 −17 .pre-commit-config.yaml
+2 −0 CMakeLists.txt
+1 −0 MANIFEST.in
+6 −3 docs/advanced/exceptions.rst
+37 −0 docs/advanced/misc.rst
+123 −1 docs/changelog.rst
+0 −1 docs/conf.py
+1 −1 include/pybind11/attr.h
+9 −5 include/pybind11/cast.h
+9 −1 include/pybind11/detail/class.h
+82 −34 include/pybind11/detail/common.h
+21 −15 include/pybind11/detail/init.h
+31 −3 include/pybind11/detail/internals.h
+9 −0 include/pybind11/detail/type_caster_base.h
+1 −702 include/pybind11/eigen.h
+701 −0 include/pybind11/eigen/matrix.h
+511 −0 include/pybind11/eigen/tensor.h
+80 −42 include/pybind11/embed.h
+9 −2 include/pybind11/functional.h
+4 −4 include/pybind11/gil.h
+13 −12 include/pybind11/numpy.h
+16 −0 include/pybind11/options.h
+81 −57 include/pybind11/pybind11.h
+42 −22 include/pybind11/pytypes.h
+107 −47 include/pybind11/stl_bind.h
+7 −1 pybind11/__main__.py
+1 −1 pybind11/_version.py
+3 −4 pybind11/setup_helpers.py
+2 −2 setup.cfg
+29 −4 tests/CMakeLists.txt
+25 −1 tests/conftest.py
+14 −0 tests/eigen_tensor_avoid_stl_array.cpp
+7 −3 tests/extra_python_package/test_files.py
+7 −2 tests/test_builtin_casters.cpp
+37 −0 tests/test_callbacks.cpp
+13 −0 tests/test_callbacks.py
+0 −4 tests/test_chrono.py
+3 −3 tests/test_class.cpp
+10 −2 tests/test_class.py
+13 −21 tests/test_constants_and_functions.cpp
+2 −1 tests/test_custom_type_casters.py
+53 −0 tests/test_docstring_options.cpp
+23 −0 tests/test_docstring_options.py
+3 −5 tests/test_eigen_matrix.cpp
+1 −1 tests/test_eigen_matrix.py
+18 −0 tests/test_eigen_tensor.cpp
+333 −0 tests/test_eigen_tensor.inl
+290 −0 tests/test_eigen_tensor.py
+1 −3 tests/test_embed/catch.cpp
+70 −3 tests/test_embed/test_interpreter.cpp
+3 −2 tests/test_exceptions.py
+2 −2 tests/test_gil_scoped.py
+4 −5 tests/test_kwargs_and_defaults.cpp
+2 −1 tests/test_local_bindings.py
+4 −5 tests/test_modules.py
+2 −0 tests/test_numpy_array.cpp
+6 −0 tests/test_numpy_array.py
+8 −15 tests/test_operator_overloading.cpp
+0 −1 tests/test_operator_overloading.py
+2 −0 tests/test_pytypes.cpp
+6 −0 tests/test_pytypes.py
+26 −0 tests/test_stl_binders.py
+2 −1 tests/test_virtual_functions.cpp
+4 −2 tools/FindPythonLibsNew.cmake
+4 −5 tools/make_changelog.py
+10 −0 tools/pybind11Common.cmake
+2 −2 tools/pybind11NewTools.cmake
+1 −1 tools/pybind11Tools.cmake
+3 −1 tools/setup_global.py.in
+2 −0 tools/setup_main.py.in
1 change: 1 addition & 0 deletions torch/csrc/distributed/rpc/py_rref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions ubsan.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vptr:pybind11::detail::translate_exception

0 comments on commit 1a8af15

Please sign in to comment.