-
Notifications
You must be signed in to change notification settings - Fork 76
Labels
Description
Describe the bug
Looks like the stubs are checking input values vs successful UT_GetDataBuffer, which doesn't make sense to me since it's used to decide if the buffer values should be used or not:
Lines 559 to 570 in 1bd7bd9
| UT_GetDataBuffer(UT_KEY(CFE_PSP_GetCFETextSegmentInfo), &TempAddr, &TempSize, NULL); | |
| if (*PtrToCFESegment == 0) | |
| { | |
| /* Backup -- Set the pointer and size to anything */ | |
| *PtrToCFESegment = (cpuaddr)&LocalTextSegment; | |
| *SizeOfCFESegment = sizeof(LocalTextSegment); | |
| } | |
| else | |
| { | |
| *PtrToCFESegment = (cpuaddr)TempAddr; | |
| *SizeOfCFESegment = TempSize; | |
| } |
Lines 604 to 615 in 1bd7bd9
| UT_GetDataBuffer(UT_KEY(CFE_PSP_GetKernelTextSegmentInfo), &TempAddr, &TempSize, NULL); | |
| if (*PtrToKernelSegment == 0) | |
| { | |
| /* Backup -- Set the pointer and size to anything */ | |
| *PtrToKernelSegment = (cpuaddr)&LocalTextSegment; | |
| *SizeOfKernelSegment = sizeof(LocalTextSegment); | |
| } | |
| else | |
| { | |
| *PtrToKernelSegment = (cpuaddr)TempAddr; | |
| *SizeOfKernelSegment = TempSize; | |
| } |
To Reproduce
You'll get an uninitialized error on the input pointer if not already set, if it's nonzero and you don't set the buffer that will utilize the Temp values which doesn't make sense to me.
Expected behavior
Use buffer values if passed in, otherwise use local dummy segment.
System observed on:
N/A
Reporter Info
Jacob Hageman - NASA/GSFC
Reactions are currently unavailable