Skip to content

Fix #2625, add initialization of table indices#2633

Merged
dzbaker merged 1 commit intonasa:mainfrom
jphickey:fix-2625-tbl-validate
Jan 31, 2025
Merged

Fix #2625, add initialization of table indices#2633
dzbaker merged 1 commit intonasa:mainfrom
jphickey:fix-2625-tbl-validate

Conversation

@jphickey
Copy link
Contributor

Checklist (Please check before submitting)

Describe the contribution
The "Last" ID values that are tracked in the CFE_TBL_Global were not initialized correctly, thus making it fail to get a record. This in turn caused the "Too many validations" issue, because it could not get a result buffer.

Fixes #2625

Testing performed

  • Reproduce bug as described in issue, then apply patch and confirm that the validation is now triggered successfully
  • Build and run all tests

Expected behavior changes
Sending the validate table command now works as expected, does not always reply with too many validations error.

System(s) tested on
Debian

Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the CCB:Ready Ready for discussion at the Configuration Control Board (CCB) label Jan 24, 2025
@jphickey jphickey force-pushed the fix-2625-tbl-validate branch from de95f21 to 9f58cb3 Compare January 24, 2025 21:57
The "Last" ID values that are tracked in the CFE_TBL_Global were not
initialized correctly, thus making it fail to get a record.  This in
turn caused the "Too many validations" issue, because it could not get a
result buffer.
@jphickey jphickey force-pushed the fix-2625-tbl-validate branch from 9f58cb3 to 3091b2a Compare January 24, 2025 22:14
CFE_TBL_Global.Registry[2].Buffers[CFE_TBL_Global.Registry[2].ActiveBufferIndex].BufferPtr = BuffPtr;

UT_SetDeferredRetcode(UT_KEY(CFE_ResourceId_FindNext), 1, -1);
UtAssert_INT32_EQ(CFE_TBL_DumpCmd(&DumpCmd), CFE_TBL_INC_ERR_CTR);

Check warning

Code scanning / CodeQL

Local variable address stored in non-local memory Warning

A stack address (
source
) may be assigned to a non-local variable.
@dzbaker dzbaker added CCB:Approved Indicates code review and approval by community CCB and removed CCB:Ready Ready for discussion at the Configuration Control Board (CCB) labels Jan 30, 2025
@dzbaker dzbaker merged commit e91b7c3 into nasa:main Jan 31, 2025
21 checks passed
@jphickey jphickey deleted the fix-2625-tbl-validate branch February 21, 2025 13:37
@dzbaker dzbaker added this to the v7.0.0 milestone Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CCB:Approved Indicates code review and approval by community CCB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table Services Validate command failure ("Too many Table Validations")

2 participants