Skip to content

Modify code that reads or writes memory addresses in external messages to use wapper #49

@skliper

Description

@skliper

In the current version, some external interface (command/telemetry) messages contain direct CPU memory addresses.

This can be very bad for several reasons:

  • Memory addresses can be a different size on different CPUs
  • Since memory addresses are likely to change from run to run (even in the same build) it makes it difficult to script tests
  • The receiver has no way to validate it (other than NULL).
  • If the address value ever gets corrupted or an invalid value is used, the consequence is usually dire (a crash).

Ultimately the use of direct memory addresses in messages should be avoided.

As a first step to this, this ticket will modify those locations that a memory address is read or written from an external message to use a wrapper function.

This ticket won't change any functionality in itself, but it will provide a path going forward such that the wrapper function can be modified to convert the address to/from a safe, verifiable, architecture independent value rather than using the address directly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions