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

Missing registering contexts in stub functions #657

Closed
jtovias opened this issue Apr 30, 2020 · 2 comments · Fixed by #673 or #712
Closed

Missing registering contexts in stub functions #657

jtovias opened this issue Apr 30, 2020 · 2 comments · Fixed by #673 or #712
Assignees
Labels
Milestone

Comments

@jtovias
Copy link
Contributor

jtovias commented Apr 30, 2020

I’ll work this issue

The issue causes seg faults cause by not registering contexts. I resolved this by adding the missing registrations.

cfe/fsw/cfe-core/ut-stubs/ut_evs_stubs.c:
int32 CFE_EVS_SendEvent(uint16 EventID,
uint16 EventType,
const char *Spec,
...)
{
int32 status;
UT_Stub_RegisterContext(UT_KEY(CFE_EVS_SendEvent), &EventID);
UT_Stub_RegisterContext(UT_KEY(CFE_EVS_SendEvent), &EventType); <----- missing
UT_Stub_RegisterContext(UT_KEY(CFE_EVS_SendEvent), Spec); <----- missing
..
}

cfe/fsw/cfe-core/ut-stubs/ ut_es_stubs.c:
int32 CFE_ES_WriteToSysLog(const char *pSpecString, ...)
{
int32 status;
UT_Stub_RegisterContext(UT_KEY(CFE_ES_WriteToSysLog), pSpecString); <----- missing
...}

Expected behavior
Return register buffer size=3 when using CFE_EVS_SendEvent and buffer size =1 when using CFE_ES_WriteToSysLog.

System observed on:

Hardware
OS: Centos 7
Versions:cFE 6.7.12.0, OSAL 5.0.11.0, PSP 1.4.8.0, chksm 9194

Reporter Info
Jose Tovias CACI/LZT Technology

@skliper skliper added the bug label May 7, 2020
@skliper skliper added this to the 6.8.0 milestone May 7, 2020
skliper pushed a commit to jtovias/cFE that referenced this issue May 19, 2020
Add missing UT_Stub_RegisterContext to CFE_EVS_SendEvent and CFE_ES_WriteToSysLog.
This will create the correct register buffer size.
@jtovias
Copy link
Contributor Author

jtovias commented May 19, 2020

@skliper , Do I make a branch from development and call it fix657-add-UT-Stub_RegisterContext?

@skliper
Copy link
Contributor

skliper commented May 19, 2020

@jtovias - I was just marking that you already fixed it in #673, marking is more for internal documentation/compliance and VDD generation at release time

astrogeco added a commit that referenced this issue May 20, 2020
Fix #657, Add UT_Stub_RegisterContext to CFE_EVS_SendEvent and CFE_ES_WriteToSysLog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants