Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
skliper opened this issue May 16, 2020 · 0 comments · Fixed by #708 or #712
Closed

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

skliper opened this issue May 16, 2020 · 0 comments · Fixed by #708 or #712
Assignees
Labels
Milestone

Comments

@skliper
Copy link
Contributor

skliper commented May 16, 2020

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)

@skliper skliper added the bug label May 16, 2020
@skliper skliper added this to the 6.8.0 milestone May 16, 2020
skliper added a commit to skliper/cFE that referenced this issue May 16, 2020
Changes Message Key from uint16 to uint32 to avoid rollover
skliper added a commit to skliper/cFS that referenced this issue May 16, 2020
@skliper skliper self-assigned this May 19, 2020
skliper added a commit to skliper/cFE that referenced this issue May 19, 2020
Changes Message Key from uint16 to uint32 to avoid rollover
astrogeco added a commit that referenced this issue May 20, 2020
Fix #707, Resolve highest MsgID of 0xFFFF bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant