Skip to content

Instantly share code, notes, and snippets.

@bstaletic
Last active January 1, 2021 13:15
Show Gist options
  • Save bstaletic/98441d24b5e0010118051c31036ef2f8 to your computer and use it in GitHub Desktop.
Save bstaletic/98441d24b5e0010118051c31036ef2f8 to your computer and use it in GitHub Desktop.
Pybind11 - valgrind errors
tests/test_gil_scoped.py::test_python_to_cpp_to_python_from_thread
==5578== ---Thread-Announcement------------------------------------------
==5578==
==5578== Thread #2 was created
==5578== at 0x4F7C282: clone (in /usr/lib/libc-2.32.so)
==5578== by 0x4D0F2D1: create_thread (in /usr/lib/libpthread-2.32.so)
==5578== by 0x4D10C10: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==5578== by 0x4841687: pthread_create_WRK (hg_intercepts.c:425)
==5578== by 0x4ABA565: PyThread_start_new_thread (thread_pthread.h:284)
==5578== by 0x4B23BA8: thread_PyThread_start_new_thread (_threadmodule.c:1113)
==5578== by 0x49941E9: cfunction_call (methodobject.c:548)
==5578== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==5578== by 0x4A4E62F: _PyObject_VectorcallTstate (abstract.h:116)
==5578== by 0x4A51F66: PyObject_Vectorcall (abstract.h:127)
==5578== by 0x4A51F66: call_function (ceval.c:5072)
==5578== by 0x4A5E4F4: _PyEval_EvalFrameDefault (ceval.c:3518)
==5578== by 0x49406BD: _PyEval_EvalFrame (pycore_ceval.h:40)
==5578== by 0x49406BD: function_code_fastcall (call.c:329)
==5578==
==5578== ----------------------------------------------------------------
==5578==
==5578== Thread #2: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==5578== at 0x483F356: pthread_cond_signal_WRK (hg_intercepts.c:1382)
==5578== by 0x4D16A7D: pthread_cond_timedwait@@GLIBC_2.3.2 (in /usr/lib/libpthread-2.32.so)
==5578== by 0x48424F4: pthread_cond_timedwait_WRK.constprop.0 (hg_intercepts.c:1293)
==5578== by 0x4A529A8: PyCOND_TIMEDWAIT (condvar.h:73)
==5578== by 0x4A529A8: take_gil (ceval_gil.h:247)
==5578== by 0x4A52DB6: PyEval_AcquireThread (ceval.c:385)
==5578== by 0x4B22ABA: t_bootstrap (_threadmodule.c:1038)
==5578== by 0x4ABA19F: pythread_wrapper (thread_pthread.h:236)
==5578== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==5578== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==5578== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==5578==
==5578== ---Thread-Announcement------------------------------------------
==5578==
==5578== Thread #1 is the program's root thread
==5578==
==5578== ----------------------------------------------------------------
==5578==
==5578== Lock at 0x4CCD110 was first observed
==5578== at 0x4842AF9: pthread_mutex_init (hg_intercepts.c:785)
==5578== by 0x4A4E15A: create_gil (ceval_gil.h:107)
==5578== by 0x4A52D08: _PyEval_InitGIL (ceval.c:285)
==5578== by 0x4A9F7C7: init_interp_create_gil (pylifecycle.c:536)
==5578== by 0x4A9F8EE: pycore_create_interpreter (pylifecycle.c:566)
==5578== by 0x4AA164D: pyinit_config (pylifecycle.c:760)
==5578== by 0x4AA3970: pyinit_core (pylifecycle.c:927)
==5578== by 0x4AA3AE1: Py_InitializeFromConfig (pylifecycle.c:1134)
==5578== by 0x4ACAD28: pymain_init (main.c:66)
==5578== by 0x4ACC12F: pymain_main (main.c:698)
==5578== by 0x4ACC206: Py_BytesMain (main.c:731)
==5578== by 0x109141: main (python.c:15)
==5578== Address 0x4ccd110 is 432 bytes inside data symbol "_PyRuntime"
==5578==
==5578== Possible data race during read of size 4 at 0x4CCD0D0 by thread #1
==5578== Locks held: none
==5578== at 0x4A4E140: gil_created (ceval_gil.h:102)
==5578== by 0x4A52825: take_gil (ceval_gil.h:234)
==5578== by 0x4A53111: PyEval_RestoreThread (ceval.c:467)
==5578== by 0x4B227E1: acquire_timed (_threadmodule.c:64)
==5578== by 0x4B22979: lock_PyThread_acquire_lock (_threadmodule.c:146)
==5578== by 0x494D586: method_vectorcall_VARARGS_KEYWORDS (descrobject.c:346)
==5578== by 0x4A4E53E: _PyObject_VectorcallTstate (abstract.h:118)
==5578== by 0x4A51F66: PyObject_Vectorcall (abstract.h:127)
==5578== by 0x4A51F66: call_function (ceval.c:5072)
==5578== by 0x4A5E3B2: _PyEval_EvalFrameDefault (ceval.c:3504)
==5578== by 0x4A60B20: _PyEval_EvalFrame (pycore_ceval.h:40)
==5578== by 0x4A60B20: _PyEval_EvalCode (ceval.c:4327)
==5578== by 0x4940F5B: _PyFunction_Vectorcall (call.c:395)
==5578== by 0x4A4E53E: _PyObject_VectorcallTstate (abstract.h:118)
==5578==
==5578== This conflicts with a previous write of size 4 by thread #2
==5578== Locks held: 1, at address 0x4CCD110
==5578== at 0x4A4F5A4: drop_gil (ceval_gil.h:162)
==5578== by 0x4A526BF: _PyEval_ReleaseLock (ceval.c:377)
==5578== by 0x4AA579A: _PyThreadState_DeleteCurrent (pystate.c:894)
==5578== by 0x4B22B7E: t_bootstrap (_threadmodule.c:1058)
==5578== by 0x4ABA19F: pythread_wrapper (thread_pthread.h:236)
==5578== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==5578== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==5578== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==5578== Address 0x4ccd0d0 is 368 bytes inside data symbol "_PyRuntime"
tests/test_gil_scoped.py::test_python_to_cpp_to_python_from_thread_multiple_parallel
==5584== ---Thread-Announcement------------------------------------------
==5584==
==5584== Thread #2 was created
==5584== at 0x4F7C282: clone (in /usr/lib/libc-2.32.so)
==5584== by 0x4D0F2D1: create_thread (in /usr/lib/libpthread-2.32.so)
==5584== by 0x4D10C10: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==5584== by 0x4841687: pthread_create_WRK (hg_intercepts.c:425)
==5584== by 0x4ABA565: PyThread_start_new_thread (thread_pthread.h:284)
==5584== by 0x4B23BA8: thread_PyThread_start_new_thread (_threadmodule.c:1113)
==5584== by 0x49941E9: cfunction_call (methodobject.c:548)
==5584== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==5584== by 0x4A4E62F: _PyObject_VectorcallTstate (abstract.h:116)
==5584== by 0x4A51F66: PyObject_Vectorcall (abstract.h:127)
==5584== by 0x4A51F66: call_function (ceval.c:5072)
==5584== by 0x4A5E4F4: _PyEval_EvalFrameDefault (ceval.c:3518)
==5584== by 0x49406BD: _PyEval_EvalFrame (pycore_ceval.h:40)
==5584== by 0x49406BD: function_code_fastcall (call.c:329)
==5584==
==5584== ----------------------------------------------------------------
==5584==
==5584== Thread #2: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==5584== at 0x483F356: pthread_cond_signal_WRK (hg_intercepts.c:1382)
==5584== by 0x4D16A7D: pthread_cond_timedwait@@GLIBC_2.3.2 (in /usr/lib/libpthread-2.32.so)
==5584== by 0x48424F4: pthread_cond_timedwait_WRK.constprop.0 (hg_intercepts.c:1293)
==5584== by 0x4A529A8: PyCOND_TIMEDWAIT (condvar.h:73)
==5584== by 0x4A529A8: take_gil (ceval_gil.h:247)
==5584== by 0x4A52DB6: PyEval_AcquireThread (ceval.c:385)
==5584== by 0x4B22ABA: t_bootstrap (_threadmodule.c:1038)
==5584== by 0x4ABA19F: pythread_wrapper (thread_pthread.h:236)
==5584== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==5584== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==5584== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==5584==
==5584== ---Thread-Announcement------------------------------------------
==5584==
==5584== Thread #1 is the program's root thread
==5584==
==5584== ----------------------------------------------------------------
==5584==
==5584== Lock at 0x4CCD110 was first observed
==5584== at 0x4842AF9: pthread_mutex_init (hg_intercepts.c:785)
==5584== by 0x4A4E15A: create_gil (ceval_gil.h:107)
==5584== by 0x4A52D08: _PyEval_InitGIL (ceval.c:285)
==5584== by 0x4A9F7C7: init_interp_create_gil (pylifecycle.c:536)
==5584== by 0x4A9F8EE: pycore_create_interpreter (pylifecycle.c:566)
==5584== by 0x4AA164D: pyinit_config (pylifecycle.c:760)
==5584== by 0x4AA3970: pyinit_core (pylifecycle.c:927)
==5584== by 0x4AA3AE1: Py_InitializeFromConfig (pylifecycle.c:1134)
==5584== by 0x4ACAD28: pymain_init (main.c:66)
==5584== by 0x4ACC12F: pymain_main (main.c:698)
==5584== by 0x4ACC206: Py_BytesMain (main.c:731)
==5584== by 0x109141: main (python.c:15)
==5584== Address 0x4ccd110 is 432 bytes inside data symbol "_PyRuntime"
==5584==
==5584== Possible data race during read of size 4 at 0x4CCD0D0 by thread #1
==5584== Locks held: none
==5584== at 0x4A4E140: gil_created (ceval_gil.h:102)
==5584== by 0x4A52825: take_gil (ceval_gil.h:234)
==5584== by 0x4A53111: PyEval_RestoreThread (ceval.c:467)
==5584== by 0x4B227E1: acquire_timed (_threadmodule.c:64)
==5584== by 0x4B22979: lock_PyThread_acquire_lock (_threadmodule.c:146)
==5584== by 0x494D586: method_vectorcall_VARARGS_KEYWORDS (descrobject.c:346)
==5584== by 0x4A4E53E: _PyObject_VectorcallTstate (abstract.h:118)
==5584== by 0x4A51F66: PyObject_Vectorcall (abstract.h:127)
==5584== by 0x4A51F66: call_function (ceval.c:5072)
==5584== by 0x4A5E3B2: _PyEval_EvalFrameDefault (ceval.c:3504)
==5584== by 0x4A60B20: _PyEval_EvalFrame (pycore_ceval.h:40)
==5584== by 0x4A60B20: _PyEval_EvalCode (ceval.c:4327)
==5584== by 0x4940F5B: _PyFunction_Vectorcall (call.c:395)
==5584== by 0x4A4E53E: _PyObject_VectorcallTstate (abstract.h:118)
==5584==
==5584== This conflicts with a previous write of size 4 by thread #2
==5584== Locks held: 1, at address 0x4CCD110
==5584== at 0x4A4F5A4: drop_gil (ceval_gil.h:162)
==5584== by 0x4A526BF: _PyEval_ReleaseLock (ceval.c:377)
==5584== by 0x4AA579A: _PyThreadState_DeleteCurrent (pystate.c:894)
==5584== by 0x4B22B7E: t_bootstrap (_threadmodule.c:1058)
==5584== by 0x4ABA19F: pythread_wrapper (thread_pthread.h:236)
==5584== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==5584== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==5584== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==5584== Address 0x4ccd0d0 is 368 bytes inside data symbol "_PyRuntime"
tests/test_gil_scoped.py::test_python_to_cpp_to_python_from_thread_multiple_sequential
==5596== ---Thread-Announcement------------------------------------------
==5596==
==5596== Thread #2 was created
==5596== at 0x4F7C282: clone (in /usr/lib/libc-2.32.so)
==5596== by 0x4D0F2D1: create_thread (in /usr/lib/libpthread-2.32.so)
==5596== by 0x4D10C10: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==5596== by 0x4841687: pthread_create_WRK (hg_intercepts.c:425)
==5596== by 0x4ABA565: PyThread_start_new_thread (thread_pthread.h:284)
==5596== by 0x4B23BA8: thread_PyThread_start_new_thread (_threadmodule.c:1113)
==5596== by 0x49941E9: cfunction_call (methodobject.c:548)
==5596== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==5596== by 0x4A4E62F: _PyObject_VectorcallTstate (abstract.h:116)
==5596== by 0x4A51F66: PyObject_Vectorcall (abstract.h:127)
==5596== by 0x4A51F66: call_function (ceval.c:5072)
==5596== by 0x4A5E4F4: _PyEval_EvalFrameDefault (ceval.c:3518)
==5596== by 0x49406BD: _PyEval_EvalFrame (pycore_ceval.h:40)
==5596== by 0x49406BD: function_code_fastcall (call.c:329)
==5596==
==5596== ----------------------------------------------------------------
==5596==
==5596== Thread #2: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
==5596== at 0x483F356: pthread_cond_signal_WRK (hg_intercepts.c:1382)
==5596== by 0x4D16A7D: pthread_cond_timedwait@@GLIBC_2.3.2 (in /usr/lib/libpthread-2.32.so)
==5596== by 0x48424F4: pthread_cond_timedwait_WRK.constprop.0 (hg_intercepts.c:1293)
==5596== by 0x4A529A8: PyCOND_TIMEDWAIT (condvar.h:73)
==5596== by 0x4A529A8: take_gil (ceval_gil.h:247)
==5596== by 0x4A52DB6: PyEval_AcquireThread (ceval.c:385)
==5596== by 0x4B22ABA: t_bootstrap (_threadmodule.c:1038)
==5596== by 0x4ABA19F: pythread_wrapper (thread_pthread.h:236)
==5596== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==5596== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==5596== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==5596==
==5596== ---Thread-Announcement------------------------------------------
==5596==
==5596== Thread #1 is the program's root thread
==5596==
==5596== ----------------------------------------------------------------
==5596==
==5596== Lock at 0x4CCD110 was first observed
==5596== at 0x4842AF9: pthread_mutex_init (hg_intercepts.c:785)
==5596== by 0x4A4E15A: create_gil (ceval_gil.h:107)
==5596== by 0x4A52D08: _PyEval_InitGIL (ceval.c:285)
==5596== by 0x4A9F7C7: init_interp_create_gil (pylifecycle.c:536)
==5596== by 0x4A9F8EE: pycore_create_interpreter (pylifecycle.c:566)
==5596== by 0x4AA164D: pyinit_config (pylifecycle.c:760)
==5596== by 0x4AA3970: pyinit_core (pylifecycle.c:927)
==5596== by 0x4AA3AE1: Py_InitializeFromConfig (pylifecycle.c:1134)
==5596== by 0x4ACAD28: pymain_init (main.c:66)
==5596== by 0x4ACC12F: pymain_main (main.c:698)
==5596== by 0x4ACC206: Py_BytesMain (main.c:731)
==5596== by 0x109141: main (python.c:15)
==5596== Address 0x4ccd110 is 432 bytes inside data symbol "_PyRuntime"
==5596==
==5596== Possible data race during read of size 4 at 0x4CCD0D0 by thread #1
==5596== Locks held: none
==5596== at 0x4A4E140: gil_created (ceval_gil.h:102)
==5596== by 0x4A52825: take_gil (ceval_gil.h:234)
==5596== by 0x4A53111: PyEval_RestoreThread (ceval.c:467)
==5596== by 0x4B227E1: acquire_timed (_threadmodule.c:64)
==5596== by 0x4B22979: lock_PyThread_acquire_lock (_threadmodule.c:146)
==5596== by 0x494D586: method_vectorcall_VARARGS_KEYWORDS (descrobject.c:346)
==5596== by 0x4A4E53E: _PyObject_VectorcallTstate (abstract.h:118)
==5596== by 0x4A51F66: PyObject_Vectorcall (abstract.h:127)
==5596== by 0x4A51F66: call_function (ceval.c:5072)
==5596== by 0x4A5E3B2: _PyEval_EvalFrameDefault (ceval.c:3504)
==5596== by 0x4A60B20: _PyEval_EvalFrame (pycore_ceval.h:40)
==5596== by 0x4A60B20: _PyEval_EvalCode (ceval.c:4327)
==5596== by 0x4940F5B: _PyFunction_Vectorcall (call.c:395)
==5596== by 0x4A4E53E: _PyObject_VectorcallTstate (abstract.h:118)
==5596==
==5596== This conflicts with a previous write of size 4 by thread #2
==5596== Locks held: 1, at address 0x4CCD110
==5596== at 0x4A4F5A4: drop_gil (ceval_gil.h:162)
==5596== by 0x4A526BF: _PyEval_ReleaseLock (ceval.c:377)
==5596== by 0x4AA579A: _PyThreadState_DeleteCurrent (pystate.c:894)
==5596== by 0x4B22B7E: t_bootstrap (_threadmodule.c:1058)
==5596== by 0x4ABA19F: pythread_wrapper (thread_pthread.h:236)
==5596== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==5596== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==5596== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==5596== Address 0x4ccd0d0 is 368 bytes inside data symbol "_PyRuntime"
tests/test_iostream.py
==4444== ---Thread-Announcement------------------------------------------
==4444==
==4444== Thread #3 was created
==4444== at 0x4F7C282: clone (in /usr/lib/libc-2.32.so)
==4444== by 0x4D0F2D1: create_thread (in /usr/lib/libpthread-2.32.so)
==4444== by 0x4D10C10: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==4444== by 0x4841687: pthread_create_WRK (hg_intercepts.c:425)
==4444== by 0x8022EF9: __gthread_create (gthr-default.h:663)
==4444== by 0x8022EF9: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (thread.cc:135)
==4444== by 0x77D6369: std::thread::thread<TestThread::TestThread()::{lambda()#1}, , void>(TestThread::TestThread()::{lambda()#1}&&) (thread:149)
==4444== by 0x77D5742: TestThread::TestThread() (test_iostream.cpp:43)
==4444== by 0x77D90D9: TestThread* pybind11::detail::initimpl::construct_or_initialize<TestThread, , 0>() (init.h:61)
==4444== by 0x77D7714: void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}::operator()(pybind11::detail::value_and_holder&) const (init.h:175)
==4444== by 0x77DCC88: void pybind11::detail::argument_loader<pybind11::detail::value_and_holder&>::call_impl<void, void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&, 0ul, pybind11::detail::void_type>(void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77DC633: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::value_and_holder&>::call<void, pybind11::detail::void_type, void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&>(void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&) && (cast.h:1999)
==4444== by 0x77DBC02: void pybind11::cpp_function::initialize<void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}, void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_<TestThread>&&, void (*)(pybind11::detail::value_and_holder&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::detail::is_new_style_constructor const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444==
==4444== ---Thread-Announcement------------------------------------------
==4444==
==4444== Thread #2 was created
==4444== at 0x4F7C282: clone (in /usr/lib/libc-2.32.so)
==4444== by 0x4D0F2D1: create_thread (in /usr/lib/libpthread-2.32.so)
==4444== by 0x4D10C10: pthread_create@@GLIBC_2.2.5 (in /usr/lib/libpthread-2.32.so)
==4444== by 0x4841687: pthread_create_WRK (hg_intercepts.c:425)
==4444== by 0x8022EF9: __gthread_create (gthr-default.h:663)
==4444== by 0x8022EF9: std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (thread.cc:135)
==4444== by 0x77D6369: std::thread::thread<TestThread::TestThread()::{lambda()#1}, , void>(TestThread::TestThread()::{lambda()#1}&&) (thread:149)
==4444== by 0x77D5742: TestThread::TestThread() (test_iostream.cpp:43)
==4444== by 0x77D90D9: TestThread* pybind11::detail::initimpl::construct_or_initialize<TestThread, , 0>() (init.h:61)
==4444== by 0x77D7714: void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}::operator()(pybind11::detail::value_and_holder&) const (init.h:175)
==4444== by 0x77DCC88: void pybind11::detail::argument_loader<pybind11::detail::value_and_holder&>::call_impl<void, void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&, 0ul, pybind11::detail::void_type>(void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77DC633: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::value_and_holder&>::call<void, pybind11::detail::void_type, void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&>(void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}&) && (cast.h:1999)
==4444== by 0x77DBC02: void pybind11::cpp_function::initialize<void pybind11::detail::initimpl::constructor<>::execute<pybind11::class_<TestThread>, , 0>(pybind11::class_<TestThread>&)::{lambda(pybind11::detail::value_and_holder&)#1}, void, pybind11::detail::value_and_holder&, pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor>(pybind11::class_<TestThread>&&, void (*)(pybind11::detail::value_and_holder&), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&, pybind11::detail::is_new_style_constructor const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x812D498 by thread #3
==4444== Locks held: none
==4444== at 0x8080CA4: width (ios_base.h:720)
==4444== by 0x8080CA4: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:87)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==4444== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x8080D56: width (ios_base.h:731)
==4444== by 0x8080D56: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:102)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== Address 0x812d498 is 24 bytes inside data symbol "_ZSt4cout"
==4444==
==4444== ---Thread-Announcement------------------------------------------
==4444==
==4444== Thread #1 is the program's root thread
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x68560F8 by thread #3
==4444== Locks held: none
==4444== at 0x808F978: pptr (streambuf:539)
==4444== by 0x808F978: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:85)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x808F9A1: __safe_pbump (streambuf:807)
==4444== by 0x808F9A1: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:93)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== Address 0x68560f8 is 56 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during write of size 8 at 0x68560F8 by thread #3
==4444== Locks held: none
==4444== at 0x808F9A1: __safe_pbump (streambuf:807)
==4444== by 0x808F9A1: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:93)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x808F9A1: __safe_pbump (streambuf:807)
==4444== by 0x808F9A1: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:93)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== Address 0x68560f8 is 56 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during write of size 8 at 0x812D498 by thread #3
==4444== Locks held: none
==4444== at 0x8080D56: width (ios_base.h:731)
==4444== by 0x8080D56: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:102)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==4444== by 0x4F7C292: clone (in /usr/lib/libc-2.32.so)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x8080D56: width (ios_base.h:731)
==4444== by 0x8080D56: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:102)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== Address 0x812d498 is 24 bytes inside data symbol "_ZSt4cout"
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Lock at 0x4CCD110 was first observed
==4444== at 0x4842AF9: pthread_mutex_init (hg_intercepts.c:785)
==4444== by 0x4A4E15A: create_gil (ceval_gil.h:107)
==4444== by 0x4A52D08: _PyEval_InitGIL (ceval.c:285)
==4444== by 0x4A9F7C7: init_interp_create_gil (pylifecycle.c:536)
==4444== by 0x4A9F8EE: pycore_create_interpreter (pylifecycle.c:566)
==4444== by 0x4AA164D: pyinit_config (pylifecycle.c:760)
==4444== by 0x4AA3970: pyinit_core (pylifecycle.c:927)
==4444== by 0x4AA3AE1: Py_InitializeFromConfig (pylifecycle.c:1134)
==4444== by 0x4ACAD28: pymain_init (main.c:66)
==4444== by 0x4ACC12F: pymain_main (main.c:698)
==4444== by 0x4ACC206: Py_BytesMain (main.c:731)
==4444== by 0x109141: main (python.c:15)
==4444== Address 0x4ccd110 is 432 bytes inside data symbol "_PyRuntime"
==4444==
==4444== Lock at 0x4CCD168 was first observed
==4444== at 0x4842AF9: pthread_mutex_init (hg_intercepts.c:785)
==4444== by 0x4A4E16F: create_gil (ceval_gil.h:109)
==4444== by 0x4A52D08: _PyEval_InitGIL (ceval.c:285)
==4444== by 0x4A9F7C7: init_interp_create_gil (pylifecycle.c:536)
==4444== by 0x4A9F8EE: pycore_create_interpreter (pylifecycle.c:566)
==4444== by 0x4AA164D: pyinit_config (pylifecycle.c:760)
==4444== by 0x4AA3970: pyinit_core (pylifecycle.c:927)
==4444== by 0x4AA3AE1: Py_InitializeFromConfig (pylifecycle.c:1134)
==4444== by 0x4ACAD28: pymain_init (main.c:66)
==4444== by 0x4ACC12F: pymain_main (main.c:698)
==4444== by 0x4ACC206: Py_BytesMain (main.c:731)
==4444== by 0x109141: main (python.c:15)
==4444== Address 0x4ccd168 is 520 bytes inside data symbol "_PyRuntime"
==4444==
==4444== Possible data race during read of size 4 at 0x4CCD0D0 by thread #3
==4444== Locks held: none
==4444== at 0x4A4E140: gil_created (ceval_gil.h:102)
==4444== by 0x4A52825: take_gil (ceval_gil.h:234)
==4444== by 0x4A52DB6: PyEval_AcquireThread (ceval.c:385)
==4444== by 0x76191C7: pybind11::gil_scoped_acquire::gil_scoped_acquire() (pybind11.h:2126)
==4444== by 0x77D4ADC: pybind11::detail::pythonbuf::_sync() (iostream.h:48)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444==
==4444== This conflicts with a previous write of size 4 by thread #2
==4444== Locks held: 2, at addresses 0x4CCD110 0x4CCD168
==4444== at 0x4A52871: take_gil (ceval_gil.h:272)
==4444== by 0x4A52DB6: PyEval_AcquireThread (ceval.c:385)
==4444== by 0x76191C7: pybind11::gil_scoped_acquire::gil_scoped_acquire() (pybind11.h:2126)
==4444== by 0x77D4ADC: pybind11::detail::pythonbuf::_sync() (iostream.h:48)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== Address 0x4ccd0d0 is 368 bytes inside data symbol "_PyRuntime"
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x68560F8 by thread #2
==4444== Locks held: none
==4444== at 0x8090194: std::basic_streambuf<char, std::char_traits<char> >::pptr() const (streambuf:539)
==4444== by 0x77D4AE8: pybind11::detail::pythonbuf::_sync() (iostream.h:51)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #3
==4444== Locks held: none
==4444== at 0x80901C4: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x68560f8 is 56 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x68560F0 by thread #2
==4444== Locks held: none
==4444== at 0x8090184: std::basic_streambuf<char, std::char_traits<char> >::pbase() const (streambuf:536)
==4444== by 0x77D4AF7: pybind11::detail::pythonbuf::_sync() (iostream.h:51)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #3
==4444== Locks held: none
==4444== at 0x80901C8: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x68560f0 is 48 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 1 at 0x6539080 by thread #2
==4444== Locks held: none
==4444== at 0x49FCEB0: unicode_decode_utf8 (unicodeobject.c:4995)
==4444== by 0x49FD6FB: PyUnicode_DecodeUTF8Stateful (unicodeobject.c:5135)
==4444== by 0x49FD71D: PyUnicode_FromStringAndSize (unicodeobject.c:2267)
==4444== by 0x760A7B2: pybind11::str::str(char const*, unsigned long) (pytypes.h:940)
==4444== by 0x77D4B24: pybind11::detail::pythonbuf::_sync() (iostream.h:51)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444==
==4444== This conflicts with a previous write of size 1 by thread #3
==4444== Locks held: none
==4444== at 0x4844843: memcpy@GLIBC_2.2.5 (vg_replace_strmem.c:1032)
==4444== by 0x808F9A0: copy (char_traits.h:395)
==4444== by 0x808F9A0: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:90)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x6539080 is 0 bytes inside a block of size 1,024 alloc'd
==4444== at 0x483C55F: operator new[](unsigned long) (vg_replace_malloc.c:431)
==4444== by 0x77D4C81: pybind11::detail::pythonbuf::pythonbuf(pybind11::object, unsigned long) (iostream.h:70)
==4444== by 0x77D4ED6: pybind11::scoped_ostream_redirect::scoped_ostream_redirect(std::ostream&, pybind11::object) (iostream.h:121)
==4444== by 0x77D5135: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Thread #3: pthread_cond_{signal,broadcast}: associated lock is not held by calling thread
==4444== at 0x483F356: pthread_cond_signal_WRK (hg_intercepts.c:1382)
==4444== by 0x4D16A7D: pthread_cond_timedwait@@GLIBC_2.3.2 (in /usr/lib/libpthread-2.32.so)
==4444== by 0x48424F4: pthread_cond_timedwait_WRK.constprop.0 (hg_intercepts.c:1293)
==4444== by 0x4A529A8: PyCOND_TIMEDWAIT (condvar.h:73)
==4444== by 0x4A529A8: take_gil (ceval_gil.h:247)
==4444== by 0x4A52DB6: PyEval_AcquireThread (ceval.c:385)
==4444== by 0x76191C7: pybind11::gil_scoped_acquire::gil_scoped_acquire() (pybind11.h:2126)
==4444== by 0x77D4ADC: pybind11::detail::pythonbuf::_sync() (iostream.h:48)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x6856100 by thread #3
==4444== Locks held: none
==4444== at 0x80901A4: std::basic_streambuf<char, std::char_traits<char> >::epptr() const (streambuf:542)
==4444== by 0x77D4B96: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x80901CC: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:565)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x6856100 is 64 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x68560F0 by thread #3
==4444== Locks held: none
==4444== at 0x8090184: std::basic_streambuf<char, std::char_traits<char> >::pbase() const (streambuf:536)
==4444== by 0x77D4BA5: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x80901C8: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x68560f0 is 48 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during write of size 8 at 0x68560F8 by thread #3
==4444== Locks held: none
==4444== at 0x80901C4: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x80901C4: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x68560f8 is 56 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during write of size 8 at 0x68560F0 by thread #3
==4444== Locks held: none
==4444== at 0x80901C8: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x80901C8: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x68560f0 is 48 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during write of size 8 at 0x6856100 by thread #3
==4444== Locks held: none
==4444== at 0x80901CC: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:565)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #2
==4444== Locks held: none
==4444== at 0x80901CC: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:565)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x6856100 is 64 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x6856100 by thread #2
==4444== Locks held: none
==4444== at 0x808F97C: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:86)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444== by 0x4D103E8: start_thread (in /usr/lib/libpthread-2.32.so)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #3
==4444== Locks held: none
==4444== at 0x80901CC: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:565)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x6856100 is 64 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during read of size 8 at 0x68560F0 by thread #2
==4444== Locks held: none
==4444== at 0x8090184: std::basic_streambuf<char, std::char_traits<char> >::pbase() const (streambuf:536)
==4444== by 0x77D4AB3: pybind11::detail::pythonbuf::_sync() (iostream.h:45)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous write of size 8 by thread #3
==4444== Locks held: none
==4444== at 0x80901C8: std::basic_streambuf<char, std::char_traits<char> >::setp(char*, char*) (streambuf:564)
==4444== by 0x77D4BB3: pybind11::detail::pythonbuf::_sync() (iostream.h:57)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== Address 0x68560f0 is 48 bytes inside a block of size 112 alloc'd
==4444== at 0x483BE3F: operator new(unsigned long) (vg_replace_malloc.c:342)
==4444== by 0x77D511C: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== by 0x4944C02: _PyObject_VectorcallTstate (abstract.h:116)
==4444== by 0x4944C02: method_vectorcall (classobject.c:61)
==4444== by 0x4A5DCCE: _PyObject_VectorcallTstate (abstract.h:118)
==4444== by 0x4A5DCCE: _PyObject_CallNoArg (abstract.h:172)
==4444== by 0x4A5DCCE: _PyEval_EvalFrameDefault (ceval.c:3387)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Possible data race during write of size 1 at 0x6539080 by thread #3
==4444== Locks held: none
==4444== at 0x4844843: memcpy@GLIBC_2.2.5 (vg_replace_strmem.c:1032)
==4444== by 0x808F9A0: copy (char_traits.h:395)
==4444== by 0x808F9A0: std::basic_streambuf<char, std::char_traits<char> >::xsputn(char const*, long) (streambuf.tcc:90)
==4444== by 0x8080DA3: sputn (streambuf:458)
==4444== by 0x8080DA3: __ostream_write<char, std::char_traits<char> > (ostream_insert.h:50)
==4444== by 0x8080DA3: std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) (ostream_insert.h:101)
==4444== by 0x808115D: std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*) (ostream:611)
==4444== by 0x77D5680: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== by 0x77DD12D: void std::__invoke_impl<void, TestThread::TestThread()::{lambda()#1}>(std::__invoke_other, TestThread::TestThread()::{lambda()#1}&&) (invoke.h:60)
==4444== by 0x77DD0E2: std::__invoke_result<TestThread::TestThread()::{lambda()#1}>::type std::__invoke<TestThread::TestThread()::{lambda()#1}>(std::__invoke_result&&, (TestThread::TestThread()::{lambda()#1}&&)...) (invoke.h:95)
==4444== by 0x77DD08F: void std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) (thread:264)
==4444== by 0x77DD063: std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> >::operator()() (thread:271)
==4444== by 0x77DD047: std::thread::_State_impl<std::thread::_Invoker<std::tuple<TestThread::TestThread()::{lambda()#1}> > >::_M_run() (thread:215)
==4444== by 0x8022C23: execute_native_thread_routine (thread.cc:80)
==4444== by 0x4841886: mythread_wrapper (hg_intercepts.c:387)
==4444==
==4444== This conflicts with a previous read of size 1 by thread #2
==4444== Locks held: none
==4444== at 0x49FCEB0: unicode_decode_utf8 (unicodeobject.c:4995)
==4444== by 0x49FD6FB: PyUnicode_DecodeUTF8Stateful (unicodeobject.c:5135)
==4444== by 0x49FD71D: PyUnicode_FromStringAndSize (unicodeobject.c:2267)
==4444== by 0x760A7B2: pybind11::str::str(char const*, unsigned long) (pytypes.h:940)
==4444== by 0x77D4B24: pybind11::detail::pythonbuf::_sync() (iostream.h:51)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== by 0x807FD82: pubsync (streambuf:278)
==4444== by 0x807FD82: std::ostream::flush() (ostream.tcc:219)
==4444== by 0x77D5695: TestThread::TestThread()::{lambda()#1}::operator()() const (test_iostream.cpp:40)
==4444== Address 0x6539080 is 0 bytes inside a block of size 1,024 alloc'd
==4444== at 0x483C55F: operator new[](unsigned long) (vg_replace_malloc.c:431)
==4444== by 0x77D4C81: pybind11::detail::pythonbuf::pythonbuf(pybind11::object, unsigned long) (iostream.h:70)
==4444== by 0x77D4ED6: pybind11::scoped_ostream_redirect::scoped_ostream_redirect(std::ostream&, pybind11::object) (iostream.h:121)
==4444== by 0x77D5135: pybind11::detail::OstreamRedirect::enter() (iostream.h:171)
==4444== by 0x77D70BC: pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}::operator()(pybind11::detail::OstreamRedirect*) const (pybind11.h:84)
==4444== by 0x77DB1E6: void pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call_impl<void, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77D9D29: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::detail::OstreamRedirect*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&>(pybind11::cpp_function::cpp_function<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&) && (cast.h:1999)
==4444== by 0x77D7E34: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D7F46: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}, void, pybind11::detail::OstreamRedirect*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, pybind11::detail::OstreamRedirect, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (pybind11::detail::OstreamRedirect::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::OstreamRedirect*)#1}&&, void (*)(pybind11::detail::OstreamRedirect*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444== by 0x4941463: _PyObject_MakeTpCall (call.c:191)
==4444== Block was alloc'd by thread #1
==4444==
==4444== ----------------------------------------------------------------
==4444==
==4444== Lock at 0x4CCD110 was first observed
==4444== at 0x4842AF9: pthread_mutex_init (hg_intercepts.c:785)
==4444== by 0x4A4E15A: create_gil (ceval_gil.h:107)
==4444== by 0x4A52D08: _PyEval_InitGIL (ceval.c:285)
==4444== by 0x4A9F7C7: init_interp_create_gil (pylifecycle.c:536)
==4444== by 0x4A9F8EE: pycore_create_interpreter (pylifecycle.c:566)
==4444== by 0x4AA164D: pyinit_config (pylifecycle.c:760)
==4444== by 0x4AA3970: pyinit_core (pylifecycle.c:927)
==4444== by 0x4AA3AE1: Py_InitializeFromConfig (pylifecycle.c:1134)
==4444== by 0x4ACAD28: pymain_init (main.c:66)
==4444== by 0x4ACC12F: pymain_main (main.c:698)
==4444== by 0x4ACC206: Py_BytesMain (main.c:731)
==4444== by 0x109141: main (python.c:15)
==4444== Address 0x4ccd110 is 432 bytes inside data symbol "_PyRuntime"
==4444==
==4444== Possible data race during read of size 4 at 0x4CCD0D0 by thread #1
==4444== Locks held: none
==4444== at 0x4A4E140: gil_created (ceval_gil.h:102)
==4444== by 0x4A52825: take_gil (ceval_gil.h:234)
==4444== by 0x4A53111: PyEval_RestoreThread (ceval.c:467)
==4444== by 0x76A26D1: pybind11::gil_scoped_release::~gil_scoped_release() (pybind11.h:2205)
==4444== by 0x77D58BE: TestThread::sleep() (test_iostream.cpp:58)
==4444== by 0x77D77FE: pybind11::cpp_function::cpp_function<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}::operator()(TestThread*) const (pybind11.h:84)
==4444== by 0x77DBF54: void pybind11::detail::argument_loader<TestThread*>::call_impl<void, pybind11::cpp_function::cpp_function<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}&, 0ul, pybind11::detail::void_type>(pybind11::cpp_function::cpp_function<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2022)
==4444== by 0x77DABC1: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<TestThread*>::call<void, pybind11::detail::void_type, pybind11::cpp_function::cpp_function<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}&>(pybind11::cpp_function::cpp_function<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}&) && (cast.h:1999)
==4444== by 0x77D9326: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}, void, TestThread*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}&&, void (*)(TestThread*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:186)
==4444== by 0x77D9438: void pybind11::cpp_function::initialize<pybind11::cpp_function::initialize<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}, void, TestThread*, pybind11::name, pybind11::is_method, pybind11::sibling>(pybind11::cpp_function::initialize<void, TestThread, , pybind11::name, pybind11::is_method, pybind11::sibling>(void (TestThread::*)(), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(TestThread*)#1}&&, void (*)(TestThread*), pybind11::name const&, pybind11::is_method const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:163)
==4444== by 0x761641F: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:751)
==4444== by 0x499413D: cfunction_call (methodobject.c:539)
==4444==
==4444== This conflicts with a previous write of size 4 by thread #3
==4444== Locks held: 1, at address 0x4CCD110
==4444== at 0x4A4F5A4: drop_gil (ceval_gil.h:162)
==4444== by 0x4A526BF: _PyEval_ReleaseLock (ceval.c:377)
==4444== by 0x4AA579A: _PyThreadState_DeleteCurrent (pystate.c:894)
==4444== by 0x4AA57CC: PyThreadState_DeleteCurrent (pystate.c:903)
==4444== by 0x76192A6: pybind11::gil_scoped_acquire::dec_ref() (pybind11.h:2151)
==4444== by 0x76192E3: pybind11::gil_scoped_acquire::~gil_scoped_acquire() (pybind11.h:2167)
==4444== by 0x77D4B86: pybind11::detail::pythonbuf::_sync() (iostream.h:48)
==4444== by 0x77D4C1B: pybind11::detail::pythonbuf::sync() (iostream.h:63)
==4444== Address 0x4ccd0d0 is 368 bytes inside data symbol "_PyRuntime"

test_async.py::test_await - cpython WONTFIX

==5804== Syscall param epoll_ctl(event) points to uninitialised byte(s)
==5804==    at 0x4B39C5E: epoll_ctl (syscall-template.S:78)
==5804==    by 0x5F34A9: pyepoll_internal_ctl (selectmodule.c:1394)
==5804==    by 0x5F35E9: select_epoll_register_impl (selectmodule.c:1440)
==5804==    by 0x5F36F6: select_epoll_register (selectmodule.c.h:702)
==5804==    by 0x64C60D: method_vectorcall_FASTCALL_KEYWORDS (descrobject.c:371)
==5804==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==5804==    by 0x4EB73C: call_function (ceval.c:4963)
==5804==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==5804==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==5804==    by 0x4DFDFB: _PyEval_EvalCodeWithName (ceval.c:4298)
==5804==    by 0x436C40: _PyFunction_Vectorcall (call.c:435)
==5804==    by 0x4EB73C: _PyObject_Vectorcall (abstract.h:127)
==5804==    by 0x4EB73C: call_function (ceval.c:4963)
==5804==    by 0x4EB73C: _PyEval_EvalFrameDefault (ceval.c:3486)
==5804==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==5804==    by 0x4DFDFB: _PyEval_EvalCodeWithName (ceval.c:4298)
==5804==  Address 0x1ffeff8c6c is on thread 1's stack
==5804==  in frame #1, created by pyepoll_internal_ctl (selectmodule.c:1381)
==5804==  Uninitialised value was created by a stack allocation
==5804==    at 0x5F343B: pyepoll_internal_ctl (selectmodule.c:1381)

tests/test_virtual_functions.py::test_dispatch_issue on shutdown

==5504== Invalid read of size 1
==5504==    at 0x49AF482: subtype_dealloc (typeobject.c:1343)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==    by 0x49796A7: _Py_DECREF (object.h:430)
==5504==    by 0x49796A7: _Py_XDECREF (object.h:497)
==5504==    by 0x49796A7: free_keys_object (dictobject.c:598)
==5504==    by 0x497B2AD: dictkeys_decref (dictobject.c:333)
==5504==    by 0x497B2AD: dict_dealloc (dictobject.c:2026)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==    by 0x49605F4: _Py_DECREF (object.h:430)
==5504==    by 0x49605F4: frame_dealloc (frameobject.c:591)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==    by 0x4AB559C: _Py_DECREF (object.h:430)
==5504==    by 0x4AB559C: _Py_XDECREF (object.h:497)
==5504==    by 0x4AB559C: tb_dealloc (traceback.c:167)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==    by 0x494ADA5: _Py_DECREF (object.h:430)
==5504==    by 0x494ADA5: BaseException_clear (exceptions.c:78)
==5504==    by 0x494B472: BaseException_dealloc (exceptions.c:88)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==  Address 0x887f549 is 185 bytes inside a block of size 936 free'd
==5504==    at 0x483B9AB: free (vg_replace_malloc.c:538)
==5504==    by 0x499704B: _PyMem_RawFree (obmalloc.c:127)
==5504==    by 0x4998889: PyObject_Free (obmalloc.c:709)
==5504==    by 0x4AC9974: PyObject_GC_Del (gcmodule.c:2317)
==5504==    by 0x49AD256: type_dealloc (typeobject.c:3486)
==5504==    by 0x97EC27E: pybind11_meta_dealloc (class.h:231)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==    by 0x97E093B: _Py_DECREF (object.h:430)
==5504==    by 0x97ECEE5: pybind11_object_dealloc (class.h:436)
==5504==    by 0x49AF481: subtype_dealloc (typeobject.c:1337)
==5504==    by 0x49935CC: _Py_Dealloc (object.c:2209)
==5504==    by 0x49796A7: _Py_DECREF (object.h:430)
==5504==    by 0x49796A7: _Py_XDECREF (object.h:497)
==5504==    by 0x49796A7: free_keys_object (dictobject.c:598)
==5504==  Block was alloc'd at
==5504==    at 0x483A77F: malloc (vg_replace_malloc.c:307)
==5504==    by 0x49970B2: _PyMem_RawMalloc (obmalloc.c:99)
==5504==    by 0x4998805: PyObject_Malloc (obmalloc.c:685)
==5504==    by 0x4AC89B8: _PyObject_GC_Alloc (gcmodule.c:2225)
==5504==    by 0x4AC972D: _PyObject_GC_Malloc (gcmodule.c:2252)
==5504==    by 0x49B2DC1: PyType_GenericAlloc (typeobject.c:1047)
==5504==    by 0x49BB359: type_new (typeobject.c:2596)
==5504==    by 0x49B2170: type_call (typeobject.c:1014)
==5504==    by 0x493B463: _PyObject_MakeTpCall (call.c:191)
==5504==    by 0x493BABF: _PyObject_FastCallDictTstate (call.c:113)
==5504==    by 0x493BB61: PyObject_VectorcallDict (call.c:142)
==5504==    by 0x4A478E2: builtin___build_class__ (bltinmodule.c:232)

test_factory_constructors.py::test_invalid_self - reinterpreting NonPybindDerived as py::detail::instance

==5804== Invalid read of size 1
==5804==    at 0x8DDB7F4: pybind11::detail::value_and_holder::value_and_holder(pybind11::detail::instance*, pybind11::detail::type_info const*, unsigned long,
unsigned long) (cast.h:219)
==5804==    by 0x8DDBB8C: pybind11::detail::values_and_holders::iterator::iterator(pybind11::detail::instance*, std::vector<pybind11::detail::type_info*, std::
allocator<pybind11::detail::type_info*> > const*) (cast.h:286)
==5804==    by 0x8DDBD2F: pybind11::detail::values_and_holders::begin() (cast.h:304)
==5804==    by 0x8DDBDAB: pybind11::detail::values_and_holders::find(pybind11::detail::type_info const*) (cast.h:308)
==5804==    by 0x8DDBF29: pybind11::detail::instance::get_value_and_holder(pybind11::detail::type_info const*, bool) (cast.h:332)
==5804==    by 0x8DE3716: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:509)
==5804==    by 0x43663D: cfunction_call_varargs (call.c:742)
==5804==    by 0x4390B4: PyObject_Call (call.c:232)
==5804==    by 0x644B77: instancemethod_call (classobject.c:528)
==5804==    by 0x43708A: _PyObject_MakeTpCall (call.c:159)
==5804==    by 0x4EB649: _PyObject_Vectorcall (abstract.h:125)
==5804==    by 0x4EB649: call_function (ceval.c:4963)
==5804==    by 0x4EB649: _PyEval_EvalFrameDefault (ceval.c:3469)
==5804==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==5804==  Address 0x8650f30 is 16 bytes after a block of size 48 alloc'd
==5804==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5804==    by 0x473646: _PyMem_RawMalloc (obmalloc.c:99)
==5804==    by 0x474B78: PyObject_Malloc (obmalloc.c:685)
==5804==    by 0x5450B6: _PyObject_GC_Alloc (gcmodule.c:1964)
==5804==    by 0x5459D6: _PyObject_GC_Malloc (gcmodule.c:1987)
==5804==    by 0x48C062: PyType_GenericAlloc (typeobject.c:1015)
==5804==    by 0x487DAB: object_new (typeobject.c:3788)
==5804==    by 0x48B415: type_call (typeobject.c:974)
==5804==    by 0x43708A: _PyObject_MakeTpCall (call.c:159)
==5804==    by 0x4EBA7F: _PyObject_Vectorcall (abstract.h:125)
==5804==    by 0x4EBA7F: call_function (ceval.c:4963)
==5804==    by 0x4EBA7F: _PyEval_EvalFrameDefault (ceval.c:3500)
==5804==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==5804==    by 0x4DFDFB: _PyEval_EvalCodeWithName (ceval.c:4298)
==5732== 4 bytes in 1 blocks are definitely lost in loss record 346 of 22,102
==5732==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5732==    by 0x8F01D65: test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}::operator()(int) const (test_copy_move.cpp:217)
==5732==    by 0x8F0B7B3: test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1* pybind11::detail::argument_loader<int>::call_impl<test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1*, test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}&, 0ul, pybind11::detail::void_type>(test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2010)
==5732==    by 0x8F096B9: std::enable_if<!std::is_void<test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1*>::value, std::is_void>::type pybind11::detail::argument_loader<int>::call<test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1*, pybind11::detail::void_type, test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}&>(test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}&) && (cast.h:1982)
==5732==    by 0x8F0814F: void pybind11::cpp_function::initialize<test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}, test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1*, int, pybind11::name, pybind11::scope, pybind11::sibling, pybind11::return_value_policy>(test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}&&, test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1* (*)(int), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&, pybind11::return_value_policy const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:183)
==5732==    by 0x8F081BA: void pybind11::cpp_function::initialize<test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}, test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1*, int, pybind11::name, pybind11::scope, pybind11::sibling, pybind11::return_value_policy>(test_submodule_copy_move_policies(pybind11::module_&)::{lambda(int)#12}&&, test_submodule_copy_move_policies(pybind11::module_&)::MoveIssue1* (*)(int), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&, pybind11::return_value_policy const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:161)
==5732==    by 0x8DE4492: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:717)
==5732==    by 0x43663D: cfunction_call_varargs (call.c:742)
==5732==    by 0x43920B: PyCFunction_Call (call.c:772)
==5732==    by 0x43708A: _PyObject_MakeTpCall (call.c:159)
==5732==    by 0x4EB649: _PyObject_Vectorcall (abstract.h:125)
==5732==    by 0x4EB649: call_function (ceval.c:4963)
==5732==    by 0x4EB649: _PyEval_EvalFrameDefault (ceval.c:3469)
==5732==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==5732==
==5732== 32 bytes in 1 blocks are definitely lost in loss record 5,412 of 22,102
==5732==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5732==    by 0x473646: _PyMem_RawMalloc (obmalloc.c:99)
==5732==    by 0x4748B1: PyMem_RawMalloc (obmalloc.c:572)
==5732==    by 0x5344A7: PyThread_allocate_lock (thread_pthread.h:388)
==5732==    by 0x4DEDCF: PyEval_InitThreads (ceval.c:216)
==5732==    by 0x51D86E: pycore_create_interpreter (pylifecycle.c:551)
==5732==    by 0x51EA11: pyinit_config (pylifecycle.c:675)
==5732==    by 0x5208B8: pyinit_core (pylifecycle.c:859)
==5732==    by 0x521286: Py_InitializeFromConfig (pylifecycle.c:1035)
==5732==    by 0x427114: pymain_init (main.c:78)
==5732==    by 0x428231: pymain_main (main.c:706)
==5732==    by 0x4282C6: Py_BytesMain (main.c:739)
==5732==
==5732== 32 bytes in 1 blocks are definitely lost in loss record 5,413 of 22,102
==5732==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5732==    by 0x473646: _PyMem_RawMalloc (obmalloc.c:99)
==5732==    by 0x4748B1: PyMem_RawMalloc (obmalloc.c:572)
==5732==    by 0x5344A7: PyThread_allocate_lock (thread_pthread.h:388)
==5732==    by 0x508FC5: _PyImport_AcquireLock (import.c:165)
==5732==    by 0x509015: _imp_acquire_lock_impl (import.c:260)
==5732==    by 0x509046: _imp_acquire_lock (import.c.h:43)
==5732==    by 0x46CBEA: cfunction_vectorcall_NOARGS (methodobject.c:459)
==5732==    by 0x4EB5B8: _PyObject_Vectorcall (abstract.h:127)
==5732==    by 0x4EB5B8: call_function (ceval.c:4963)
==5732==    by 0x4EB5B8: _PyEval_EvalFrameDefault (ceval.c:3469)
==5732==    by 0x4DF2EE: PyEval_EvalFrameEx (ceval.c:741)
==5732==    by 0x43627B: function_code_fastcall (call.c:283)
==5732==    by 0x436D21: _PyFunction_Vectorcall (call.c:410)
==5732==
==5732== 40 bytes in 1 blocks are definitely lost in loss record 7,435 of 22,102
==5732==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5732==    by 0x400F71E: _dl_map_object_deps (dl-deps.c:438)
==5732==    by 0x4015D9F: dl_open_worker (dl-open.c:571)
==5732==    by 0x4B7A8B7: _dl_catch_exception (dl-error-skeleton.c:208)
==5732==    by 0x40155F9: _dl_open (dl-open.c:837)
==5732==    by 0x487234B: dlopen_doit (dlopen.c:66)
==5732==    by 0x4B7A8B7: _dl_catch_exception (dl-error-skeleton.c:208)
==5732==    by 0x4B7A982: _dl_catch_error (dl-error-skeleton.c:227)
==5732==    by 0x4872B58: _dlerror_run (dlerror.c:170)
==5732==    by 0x48723D9: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==5732==    by 0x540376: _PyImport_FindSharedFuncptr (dynload_shlib.c:99)
==5732==    by 0x50C76D: _PyImport_LoadDynamicModuleWithSpec (importdl.c:134)
==5732==
=5732== 56 bytes in 1 blocks are definitely lost in loss record 10,795 of 22,102
==5732==    at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5732==    by 0x473646: _PyMem_RawMalloc (obmalloc.c:99)
==5732==    by 0x473529: _PyMem_DebugRawAlloc (obmalloc.c:2120)
==5732==    by 0x473565: _PyMem_DebugRawMalloc (obmalloc.c:2153)
==5732==    by 0x4748B1: PyMem_RawMalloc (obmalloc.c:572)
==5732==    by 0x5344A7: PyThread_allocate_lock (thread_pthread.h:388)
==5732==    by 0x521513: _PyRuntimeState_Init_impl (pystate.c:73)
==5732==    by 0x521CA7: _PyRuntimeState_Init (pystate.c:98)
==5732==    by 0x51FB97: _PyRuntime_Initialize (pylifecycle.c:89)
==5732==    by 0x427004: pymain_init (main.c:41)
==5732==    by 0x428231: pymain_main (main.c:706)
==5732==    by 0x4282C6: Py_BytesMain (main.c:739)
==5732==
==5721== 168 (136 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 19,999 of 22,388
==5721==    at 0x483BE63: operator new(unsigned long) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==5721==    by 0x8DE16BC: pybind11::cpp_function::make_function_record() (pybind11.h:119)
==5721==    by 0x8FB6008: void pybind11::cpp_function::initialize<test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}, pybind11::tuple, int, int, pybind11::name, pybind11::scope, pybind11::sibling, pybind11::kw_only, pybind11::arg, pybind11::sibling>(test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}&&, pybind11::tuple (*)(int, int), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&, pybind11::kw_only const&, pybind11::arg const&, pybind11::sibling const&) (pybind11.h:129)
==5721==    by 0x8FB205C: pybind11::cpp_function::cpp_function<test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}, pybind11::name, pybind11::scope, pybind11::sibling, pybind11::kw_only, pybind11::arg, pybind11::sibling, void>(test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}&&, pybind11::name const&, pybind11::scope const&, pybind11::sibling const&, pybind11::kw_only const&, pybind11::arg const&, pybind11::sibling const&) (pybind11.h:77)
==5721==    by 0x8FB01C0: pybind11::module_& pybind11::module_::def<test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}, pybind11::kw_only, pybind11::arg, test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}>(char const*, test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1}&&, pybind11::kw_only const&, pybind11::arg const&, test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const::{lambda(int, int)#1} const&) (pybind11.h:912)
==5721==    by 0x8FACF03: test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}::operator()(pybind11::module_) const (test_kwargs_and_defaults.cpp:112)
==5721==    by 0x8FB9F2B: void pybind11::detail::argument_loader<pybind11::module_>::call_impl<void, test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}&, 0ul, pybind11::detail::void_type>(test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}&, std::integer_sequence<unsigned long, 0ul>, pybind11::detail::void_type&&) && (cast.h:2010)
==5721==    by 0x8FB8225: std::enable_if<std::is_void<void>::value, pybind11::detail::void_type>::type pybind11::detail::argument_loader<pybind11::module_>::call<void, pybind11::detail::void_type, test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}&>(test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}&) && (cast.h:1987)
==5721==    by 0x8FB6183: void pybind11::cpp_function::initialize<test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}, void, pybind11::module_, pybind11::name, pybind11::scope, pybind11::sibling>(test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}&&, void (*)(pybind11::module_), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call) const (pybind11.h:183)
==5721==    by 0x8FB621F: void pybind11::cpp_function::initialize<test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}, void, pybind11::module_, pybind11::name, pybind11::scope, pybind11::sibling>(test_submodule_kwargs_and_defaults(pybind11::module_&)::{lambda(pybind11::module_)#19}&&, void (*)(pybind11::module_), pybind11::name const&, pybind11::scope const&, pybind11::sibling const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call) (pybind11.h:161)
==5721==    by 0x8DE4492: pybind11::cpp_function::dispatcher(_object*, _object*, _object*) (pybind11.h:717)
==5721==    by 0x43663D: cfunction_call_varargs (call.c:742)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment