Skip to content

pmci: mctp: MCTP USB binding hard faults when using Zephyr heap #98688

@eric-ocasio-nxp

Description

@eric-ocasio-nxp

Describe the bug

The MCTP USB binding was tested using standard library malloc/free/realloc based on existing sample applications. This worked fine. If using the Zephyr sys_heap instead, a hard fault is seen when the MCTP USB binding tries to reset state after processing a packet. This occurs because k_free() does not set the memory pointer to NULL after free'ing the memory, resulting in a "double free" operation.

Regression

  • This is a regression.

Steps to reproduce

No response

Relevant log output

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

  • Page: project/issues
  • Version: main
  • SHA-1: 5b3b9c7

Additional Context

This issue was reported from the online documentation page using the 'Report an issue' button.

Metadata

Metadata

Assignees

Labels

area: PMCIPlatform Management Communications InfrastructurebugThe issue is a bug, or the PR is fixing a bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions