summaryrefslogtreecommitdiff
path: root/ext/pybind11/tests/pybind11_tests.cpp
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-05-09 19:28:47 +0100
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-05-22 17:15:09 +0000
commitca1d18d599dcc620bf526fb22042af95b1b60b68 (patch)
treefc4833267ec2f50bec469f6ef6bd665403d1aeb0 /ext/pybind11/tests/pybind11_tests.cpp
parent2da0ab06b720e5b22fb3a81585ef9eecc752a99f (diff)
downloadgem5-ca1d18d599dcc620bf526fb22042af95b1b60b68.tar.xz
python: Prevent Python wrappers from deleting SimObjects
The PyBind wrappers could potentially delete SimObjects if they don't have any references. This is not desirable since there could be pointers to such objects within the C++ world. This problem doesn't normally occur since Python typically holds a pointer to the root node as long as the simulator is running. Prevent SimObject and Param deletion by using a PyBind-prescribed unique_ptr with a dummy deleter as the pointer wrapper for the Python world. Change-Id: Ied14602c9ee69a083a69c5dae1b5fcf8efb4548a Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Curtis Dunham <curtis.dunham@arm.com> Reviewed-on: https://gem5-review.googlesource.com/3224 Reviewed-by: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'ext/pybind11/tests/pybind11_tests.cpp')
0 files changed, 0 insertions, 0 deletions