Skip to content

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

Open

Description

@amgross

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.

Activity

  1. amgross commented on Dec 8, 2024

    @amgross
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions