Skip to content

[DO NOT MERGE] Dummy PR to test Coverity enabled for DMCLI Component#17

Closed
im1308 wants to merge 3 commits intodevelopfrom
feature/dmcli_dummyPR2
Closed

[DO NOT MERGE] Dummy PR to test Coverity enabled for DMCLI Component#17
im1308 wants to merge 3 commits intodevelopfrom
feature/dmcli_dummyPR2

Conversation

@im1308
Copy link
Copy Markdown
Contributor

@im1308 im1308 commented Mar 11, 2026

Code changes made to check coverity for DM CLI Component

@im1308 im1308 requested a review from a team as a code owner March 11, 2026 10:05
Copilot AI review requested due to automatic review settings March 11, 2026 10:05
@im1308 im1308 requested a review from a team as a code owner March 11, 2026 10:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears intended as a dummy change to validate that Coverity is enabled for the DMCLI component by introducing a small code modification in the MsgBus test server.

Changes:

  • Added several local variable declarations inside _print_stack_backtrace() in ssp_main.c.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/MsgBusTestServer/ssp_main.c Outdated
Comment on lines +97 to +101
int iData;
int arr[3];
int arr[4] = 10;


Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The added variables (iData, arr) are unused and also not indented consistently with the rest of this function. If these were only added to exercise Coverity, consider removing them or guarding them behind a dedicated test macro so they don't introduce warnings/noise in normal builds.

Suggested change
int iData;
int arr[3];
int arr[4] = 10;

Copilot uses AI. Check for mistakes.
Comment thread source/MsgBusTestServer/ssp_main.c Outdated
Comment on lines +97 to +101
int iData;
int arr[3];
int arr[4] = 10;


Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new declarations will break compilation: arr is declared twice in the same scope (redefinition), and int arr[4] = 10; is not a valid array initializer in C (should use a brace initializer like {10} or assign to an element after declaration). Remove these debug variables or fix to a single, correctly-initialized declaration if needed.

Suggested change
int iData;
int arr[3];
int arr[4] = 10;

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings March 11, 2026 10:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +97 to +105
int arr[3];
arr[2]=7;
arr[4] = 10;

if(arr[2]==5) {
printf("\n Value 5\n");
} else {
printf("\n Value NONE\n");
}
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added arr/printf block in _print_stack_backtrace() looks like temporary instrumentation and changes runtime behavior (extra stdout output) unrelated to stack tracing. Please remove it (or guard it behind an explicit test-only macro) before merging, and follow the file’s indentation/logging conventions (e.g., use existing trace/log macros rather than raw printf).

Suggested change
int arr[3];
arr[2]=7;
arr[4] = 10;
if(arr[2]==5) {
printf("\n Value 5\n");
} else {
printf("\n Value NONE\n");
}

Copilot uses AI. Check for mistakes.

int arr[3];
arr[2]=7;
arr[4] = 10;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverity Issue - Out-of-bounds write

Overrunning array "arr" of 3 4-byte elements at element index 4 (byte offset 19) using index "4".

High Impact, CWE-119
OVERRUN

@im1308 im1308 closed this Mar 11, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants