Skip to content

Setting highest valid message ID's to 0xFFFF hangs cfe #707

@skliper

Description

@skliper

Describe the bug
Given max number of message keys is 1+ highest valid msgid:

#define CFE_SB_MAX_NUMBER_OF_MSG_KEYS (1+CFE_PLATFORM_SB_HIGHEST_VALID_MSGID)

and message key is uint16:

typedef uint16 CFE_SB_MsgKey_Atom_t;

Setting CFE_PLATFORM_SB_HIGHEST_VALID_MSGID to 0xFFFF results in forever loop in:

CFE_SB_MsgKey_Atom_t KeyVal;
for (KeyVal=0; KeyVal < CFE_SB_MAX_NUMBER_OF_MSG_KEYS; KeyVal++)
{
CFE_SB.MsgMap[KeyVal] = CFE_SB_INVALID_ROUTE_IDX;
}

To Reproduce
Set CFE_PLATFORM_SB_HIGHEST_VALID_MSGID to 0xFFFF and build/run.

Expected behavior
Full 16 bits of message id should be usable.

Code snips
See above

System observed on:

  • Hardware: cFS Dev 3
  • OS: Ubuntu 18.04
  • Versions: master bundle

Additional context
None

Reporter Info
Jacob Hageman - NASA/GSFC (per JSC identification of the issue)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions