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

[QUESTION] Why in erpc_setup_mbf_XXX failure is fatal? #440

Open
3 tasks done
amgross opened this issue Dec 8, 2024 · 1 comment
Open
3 tasks done

[QUESTION] Why in erpc_setup_mbf_XXX failure is fatal? #440

amgross opened this issue Dec 8, 2024 · 1 comment
Labels

Comments

@amgross
Copy link
Contributor

amgross commented Dec 8, 2024

If you didn't find answer in existing open/closed issues you may ask here

In static mbf setup, in case that there is no more buffers assert is called:

erpc_assert(idx < ERPC_DEFAULT_BUFFERS_COUNT);

In dynamic, if allocation failed then the NULL pointer will be set as buffer:
return MessageBuffer(buf, ERPC_DEFAULT_BUFFER_SIZE);

I would expect in both cases to return error. Why is current implementation as is? (or it is a bug?)

Steps you didn't forgot to do

  • I checked if there is no related issue opened/closed.
  • I checked that there doesn't exist opened/closed PR which is solving this issue.
  • I looked in documentation if there is related information.
@amgross
Copy link
Contributor Author

amgross commented Dec 8, 2024

Maybe it is just because this function does not return pointer but class? hence should be fixed with #416

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

No branches or pull requests

1 participant