Skip to content

missing fx_media_open_notify initialization without FX_DISABLE_FORCE_MEMORY_OPERATION defined #4

Open
@TheFlyvio

Description

@TheFlyvio

when user does not need the open notification, the FX_DISABLE_FORCE_MEMORY_OPERATION is undefined and fx_media_open_notify_set(fx_media, NULL) is not called before the opening, the FX_MEDIA fx_media_open_notify attribute is never initialized, resulting in a potential hard fault.

Azure RTOS 6.3.0

Steps to reproduce the behavior:

  1. let FX_DISABLE_FORCE_MEMORY_OPERATION undefined
  2. do not call fx_media_open_notify_set
  3. create FX_MEDIA in the stack after some work was done and memory isnt only zeroes anymore
  4. open the media
  5. the "address" contained in fx_media_open_notify will be called

two ways it can be worked around
-defining FX_DISABLE_FORCE_MEMORY_OPERATION
-before the opening, calling fx_media_open_notify_set with a function pointer or null

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions