-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smart_holder trampoline shared_from_this support #3023
Commits on Jun 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for d9ac283 - Browse repository at this point
Copy the full SHA d9ac283View commit details -
Experiments: 1. disabling enable_shared_from_this, 2. using smart_hol…
…der in test_class_sh_shared_from_this.cpp
Configuration menu - View commit details
-
Copy full SHA for 007ab63 - Browse repository at this point
Copy the full SHA 007ab63View commit details -
Breaking up test_shared_ptr_from_this_and_references into smaller sub…
…tests. Skipping the only test that generates an ASAN heap-use-after-free.
Configuration menu - View commit details
-
Copy full SHA for 4e993f7 - Browse repository at this point
Copy the full SHA 4e993f7View commit details -
Restoring init_holder overload for std::enable_shared_from_this and o…
…riginal tests/test_smart_ptr.py.
Configuration menu - View commit details
-
Copy full SHA for bfaa006 - Browse repository at this point
Copy the full SHA bfaa006View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fc5a02 - Browse repository at this point
Copy the full SHA 1fc5a02View commit details -
enable_shared_from_this_from_raw_ptr_take_ownership_guard: better sta…
…tic_assert that also triggers for derived classes.
Configuration menu - View commit details
-
Copy full SHA for 4a9f6ea - Browse repository at this point
Copy the full SHA 4a9f6eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20aa407 - Browse repository at this point
Copy the full SHA 20aa407View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d403f3 - Browse repository at this point
Copy the full SHA 4d403f3View commit details -
Fully emulating type_caster_base-related behavior: trying shared_from…
…_this also for unowned pointees.
Configuration menu - View commit details
-
Copy full SHA for 3d603f2 - Browse repository at this point
Copy the full SHA 3d603f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60fd973 - Browse repository at this point
Copy the full SHA 60fd973View commit details -
Configuration menu - View commit details
-
Copy full SHA for 881b25c - Browse repository at this point
Copy the full SHA 881b25cView commit details -
Configuration menu - View commit details
-
Copy full SHA for f5ac855 - Browse repository at this point
Copy the full SHA f5ac855View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd13ad9 - Browse repository at this point
Copy the full SHA bd13ad9View commit details -
Revert "Experiment: restoring original smart_holder_type_casters.h fr…
…om smart_holder branch." This reverts commit 19c5a36.
Configuration menu - View commit details
-
Copy full SHA for 8bb208a - Browse repository at this point
Copy the full SHA 8bb208aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e45ab22 - Browse repository at this point
Copy the full SHA e45ab22View commit details -
Revert "Experiment: effectively undoing all shared_from_this modifica…
…tions." This reverts commit d72d54e.
Configuration menu - View commit details
-
Copy full SHA for 5817c83 - Browse repository at this point
Copy the full SHA 5817c83View commit details -
Revert "Experiment: commenting out test_class_sh_shared_from_this."
This reverts commit febf9ce.
Configuration menu - View commit details
-
Copy full SHA for 8fb1210 - Browse repository at this point
Copy the full SHA 8fb1210View commit details -
Copying in shared_from_this_custom_deleters.cpp from github.com/rwgk,…
… with adjustments. Base version: https://github.com/rwgk/stuff/blob/e5318faa6a8583b7c338e01398a4eea69abda08d/shared_from_this_custom_deleters.cpp
Configuration menu - View commit details
-
Copy full SHA for 86e2024 - Browse repository at this point
Copy the full SHA 86e2024View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b46052 - Browse repository at this point
Copy the full SHA 2b46052View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97d4dab - Browse repository at this point
Copy the full SHA 97d4dabView commit details -
Configuration menu - View commit details
-
Copy full SHA for cad91e7 - Browse repository at this point
Copy the full SHA cad91e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9845f69 - Browse repository at this point
Copy the full SHA 9845f69View commit details -
Configuration menu - View commit details
-
Copy full SHA for df25405 - Browse repository at this point
Copy the full SHA df25405View commit details -
Configuration menu - View commit details
-
Copy full SHA for fdc91f8 - Browse repository at this point
Copy the full SHA fdc91f8View commit details -
WIP snapshot: replacing
std::shared_ptr<bool> flag_ptr
with simple ……`bool armed_flag`.
Configuration menu - View commit details
-
Copy full SHA for d704167 - Browse repository at this point
Copy the full SHA d704167View commit details -
Configuration menu - View commit details
-
Copy full SHA for 307766f - Browse repository at this point
Copy the full SHA 307766fView commit details -
Inserting
const_cast
forstd::get_deleter
return, to keep Ubuntu ……20 GCC 6.3.0 happy.
Configuration menu - View commit details
-
Copy full SHA for 79c711e - Browse repository at this point
Copy the full SHA 79c711eView commit details -
Adding back explicit but default copy constructor, to keep some older…
… compilers happy.
Configuration menu - View commit details
-
Copy full SHA for 87756ca - Browse repository at this point
Copy the full SHA 87756caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 994800b - Browse repository at this point
Copy the full SHA 994800bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d3104be - Browse repository at this point
Copy the full SHA d3104beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2745c31 - Browse repository at this point
Copy the full SHA 2745c31View commit details -
First attempt to make shared_from_this and trampolines play nicely. P…
…asses all pybind11 and PyCLIF unit tests ASAN clean, but not the open_spiel iterated_prisoners_dilemma_test.
Configuration menu - View commit details
-
Copy full SHA for 86a4fb7 - Browse repository at this point
Copy the full SHA 86a4fb7View commit details -
First fully successful attempt to make
shared_from_this
and trampol……ines play nicely. Now also passes the open_spiel iterated_prisoners_dilemma_test ASAN clean, in addition to all pybind11 and PyCLIF unit tests. The problem was that calling `std::shared_ptr<void>::reset()` with a `void` pointer cannot possibly update the `shared_from_this` `weak_ptr`. The solution is to store a `shd_ptr_reset` function pointer in `guarded_deleter` (similar in idea to the stored function pointer for calling `delete`). This commit still includes all debugging code, i.e. is "dirty". The code will be cleaned up after the GitHub CI is fully successful.
Configuration menu - View commit details
-
Copy full SHA for 1c98886 - Browse repository at this point
Copy the full SHA 1c98886View commit details -
Configuration menu - View commit details
-
Copy full SHA for 69fcb36 - Browse repository at this point
Copy the full SHA 69fcb36View commit details -
Configuration menu - View commit details
-
Copy full SHA for 691127c - Browse repository at this point
Copy the full SHA 691127cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef5bc6d - Browse repository at this point
Copy the full SHA ef5bc6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76deebe - Browse repository at this point
Copy the full SHA 76deebeView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7c257f - Browse repository at this point
Copy the full SHA c7c257fView commit details -
Configuration menu - View commit details
-
Copy full SHA for da812cd - Browse repository at this point
Copy the full SHA da812cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for c469587 - Browse repository at this point
Copy the full SHA c469587View commit details -
Adding
test_pass_released_shared_ptr_as_unique_ptr
, exercising new ……guard in smart_holder_type_casters.h.
Configuration menu - View commit details
-
Copy full SHA for a17ad73 - Browse repository at this point
Copy the full SHA a17ad73View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb7c51f - Browse repository at this point
Copy the full SHA eb7c51fView commit details -
Leveraging new
noop_deleter_acting_as_weak_ptr_owner
to retrieve re……leased `vptr`. The placeholder `vptr` is never exposed anymore, therefore the externally visible `use_count`s are more intuitive.
Configuration menu - View commit details
-
Copy full SHA for 3f190fb - Browse repository at this point
Copy the full SHA 3f190fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd40c4c - Browse repository at this point
Copy the full SHA bd40c4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d319b7 - Browse repository at this point
Copy the full SHA 1d319b7View commit details -
smart_holder_poc.h: type-erase raw_ptr before passing to shared_ptr::…
…reset, to not trigger populating the shared_from_this weak_ptr. This way the only way the weak_ptr is populated is through loaded_as_shared_ptr. Breaks all but one test in test_class_sh_trampoline_shared_from_this.py, now marked skip WIP to test everything else with the GitHub CI.
Configuration menu - View commit details
-
Copy full SHA for d68094d - Browse repository at this point
Copy the full SHA d68094dView commit details -
Simpler and safe implementation based on new requirement: C++ (outsid…
…e of the Python object) needs to hold a shared_ptr before shared_from_this is called. This is more similar to the existing implementation on current smart_holder HEAD, but still uses a weak_ptr to always return the same shared_ptr as long as C++ does not let it expire.
Configuration menu - View commit details
-
Copy full SHA for d94e348 - Browse repository at this point
Copy the full SHA d94e348View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1cb657d - Browse repository at this point
Copy the full SHA 1cb657dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f88eac - Browse repository at this point
Copy the full SHA 4f88eacView commit details -
Adding test_pure_cpp_sft_raw_ptr (with 3 TODO: Fix), test_pure_cpp_sf…
…t_shd_ptr (works as desired).
Configuration menu - View commit details
-
Copy full SHA for 78ddb1a - Browse repository at this point
Copy the full SHA 78ddb1aView commit details -
Preparation for being smarter about casting to
void *
to evade to s……hared_from_this mechanism.
Configuration menu - View commit details
-
Copy full SHA for 75fcf5f - Browse repository at this point
Copy the full SHA 75fcf5fView commit details -
Use casting to
void *
to evade to shared_from_this mechanism only i……f `pointee_depends_on_holder_owner`, but currently only for `from_raw_ptr_take_ownership`.
Configuration menu - View commit details
-
Copy full SHA for 50ac3ef - Browse repository at this point
Copy the full SHA 50ac3efView commit details -
Resolving TODOs for
from_unique_ptr
void_cast_raw_ptr
. Adding tes……t to exercise the path through `cast`. The path through init.h is missing a test that would fail if the flag is incorrect. The plan is to systematically cover all situations (there are many that are not exercised for shared_from_this).
Configuration menu - View commit details
-
Copy full SHA for 8870251 - Browse repository at this point
Copy the full SHA 8870251View commit details -
Configuration menu - View commit details
-
Copy full SHA for 73e8d71 - Browse repository at this point
Copy the full SHA 73e8d71View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fc8313 - Browse repository at this point
Copy the full SHA 7fc8313View commit details -
Updating Catch version to latest, in hopes of resolving the GHA downl…
…oad issue affecting all MSVC builds.
Configuration menu - View commit details
-
Copy full SHA for 7031875 - Browse repository at this point
Copy the full SHA 7031875View commit details -
Revert "Updating Catch version to latest, in hopes of resolving the G…
…HA download issue affecting all MSVC builds." This reverts commit f4e1112. It didn't help.
Configuration menu - View commit details
-
Copy full SHA for 1528efb - Browse repository at this point
Copy the full SHA 1528efbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0956874 - Browse repository at this point
Copy the full SHA 0956874View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c69fee - Browse repository at this point
Copy the full SHA 3c69feeView commit details -
This change fixes the 6 unit tests in
https://github.com/deepmind/open_spiel/tree/bbfb0259b5d26c1e3f05000f1f4a05b7ad60393e/open_spiel/python/mfg/algorithms best_response_value_test distribution_test fictitious_play_test greedy_policy_test nash_conv_test policy_value_test CAVEAT: The fix is NOT covered by pybind11 unit tests.
Configuration menu - View commit details
-
Copy full SHA for 9c84800 - Browse repository at this point
Copy the full SHA 9c84800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7663896 - Browse repository at this point
Copy the full SHA 7663896View commit details -
Adding unit tests: 2 x test_std_make_shared_factory
Completes unit test coverage for the changed code in smart_holder_type_casters.h.
Configuration menu - View commit details
-
Copy full SHA for f772ccd - Browse repository at this point
Copy the full SHA f772ccdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 815238c - Browse repository at this point
Copy the full SHA 815238cView commit details -
Adding test_multiple_registered_instances_for_same_pointee_leak. Subt…
…le changes in smart_holder_type_caster_load, trying to work on weak_ptr for shared_ptr_trampoline_self_life_support, but that didn't work out. Manually fully leak-checked again.
Configuration menu - View commit details
-
Copy full SHA for 0043fe5 - Browse repository at this point
Copy the full SHA 0043fe5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c64a9e - Browse repository at this point
Copy the full SHA 4c64a9eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 08e9c60 - Browse repository at this point
Copy the full SHA 08e9c60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45fbdfc - Browse repository at this point
Copy the full SHA 45fbdfcView commit details