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

Freeing static objects #353

Conversation

Hadatko
Copy link
Member

@Hadatko Hadatko commented Mar 7, 2023

Pull request

Choose Correct

  • bug
  • feature

Describe the pull request

#349

To Reproduce

Expected behavior

Compile code.

Screenshots

Desktop (please complete the following information):

  • OS:
  • eRPC Version:

Steps you didn't forgot to do

  • I checked if other PR isn't solving this issue.
  • I read Contribution details and did appropriate actions.
  • PR code is tested.
  • PR code is formatted.
  • Allow edits from maintainers pull request option is set (recommended).

Additional context

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
@Hadatko Hadatko self-assigned this Mar 7, 2023
@Hadatko Hadatko added this to the 1.11.0 milestone Mar 7, 2023
@Hadatko Hadatko linked an issue Mar 7, 2023 that may be closed by this pull request
@Hadatko Hadatko added the bug label Mar 7, 2023
@MichalPrincNXP MichalPrincNXP merged commit 60445dd into EmbeddedRPC:develop Mar 7, 2023
@MichalPrincNXP
Copy link
Member

Thank you for preparing this bugfix

@Hadatko Hadatko deleted the bugfix/freing_static_objects branch March 7, 2023 15:20
@Diagano
Copy link

Diagano commented Mar 8, 2023

Just for completness (and because we compile with -Werror), I think you missed casting. The comparison is between two distinct pointer types.
This applies to: erpc_server_deinit(), erpc_client_deinit() & erpc_arbitrated_client_deinit(). I think these should be something like the following

erpc_assert(reinterpret_cast<SimpleServer *>(server) == s_server.get());
erpc_assert(reinterpret_cast<ClientManager *>(client) == s_client.get());
erpc_assert(reinterpret_cast<ArbitratedClientManager *>(client) == s_client.get());

@Hadatko
Copy link
Member Author

Hadatko commented Mar 8, 2023

Thank you for your input. I will fix this.

@Hadatko Hadatko mentioned this pull request Mar 8, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants