Skip to content

Mismatched Variable Types in Data Structures  #663

@dmknutsen

Description

@dmknutsen

Describe the bug
While auditing cFE tlm packets for 64 bit alignment issues, I noticed that we have instances of mismatched variable types in data structures. This results in data being truncated/corrupted.

Example:
In cfe_es.h::CFE_ES_AppInfo_t
There are multiple addresses (StartAddress, CodeAddress, etc) declared as uint32. They should be declared as cpuaddr variables - similar to CFE_ES_AppStartParams_t:StartAddress and OS_module_address_t:code_address.

Another example is the priority, stackSize, and Exception Action variables. See below for declaration trace:

CFE_ES_ParseFileEntry:
unsigned int Priority
unsigned int StackSize
unsigned int ExceptionAction

CFE_ES_AppCreate:
uint32 Priority
uint32 StackSize
uint32 ExceptionAction

CFE_ES_AppStartParams_t:
uint16 ExceptionAction
uint16 Priority
uint32 StackSize

CFE_ES_AppInfo_t:
uint16 Priority
uint16 ExceptionAction
uint32 StackSize

Reporter Info
Dan Knutsen
NASA/Goddard

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions