Skip to content
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

Fix two destruction order issues causing segfaults during shutdown #789

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hefroy
Copy link
Contributor

@hefroy hefroy commented Oct 21, 2024

  1. application_impl::~application_impl calls the plugin_manager when VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS is not defined. Therefore it should hold a shared_ptr to it instead of calling plugin_manager::get() in the destructor, in order to prevent the global the_plugin_manager__ instance being destroyed before it is.
  2. routing_manager_impl::~routing_manager_impl calls utility functions. Therefore destroy the routing_ instance in application_impl::shutdown to ensure that this happens before the utility global variables are destroyed.

1. `application_impl::~application_impl` calls the `plugin_manager` when
   `VSOMEIP_ENABLE_MULTIPLE_ROUTING_MANAGERS` is not defined.
   Therefore it should hold a `shared_ptr` to it instead of calling
   `plugin_manager::get()` in the destructor, in order to prevent the
   global `the_plugin_manager__` instance being destroyed before it is.
2. `routing_manager_impl::~routing_manager_impl` calls `utility`
   functions. Therefore destroy the `routing_` instance in
   `application_impl::shutdown` to ensure that this happens before the
   `utility` global variables are destroyed.
@hefroy hefroy mentioned this pull request Oct 21, 2024
@hefroy
Copy link
Contributor Author

hefroy commented Dec 16, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant