[DO NOT MERGE] Dummy PR to test Coverity enabled for DMCLI Component#17
[DO NOT MERGE] Dummy PR to test Coverity enabled for DMCLI Component#17
Conversation
There was a problem hiding this comment.
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()inssp_main.c.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| int iData; | ||
| int arr[3]; | ||
| int arr[4] = 10; | ||
|
|
||
|
|
There was a problem hiding this comment.
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.
| int iData; | |
| int arr[3]; | |
| int arr[4] = 10; |
| int iData; | ||
| int arr[3]; | ||
| int arr[4] = 10; | ||
|
|
||
|
|
There was a problem hiding this comment.
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.
| int iData; | |
| int arr[3]; | |
| int arr[4] = 10; |
There was a problem hiding this comment.
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.
| int arr[3]; | ||
| arr[2]=7; | ||
| arr[4] = 10; | ||
|
|
||
| if(arr[2]==5) { | ||
| printf("\n Value 5\n"); | ||
| } else { | ||
| printf("\n Value NONE\n"); | ||
| } |
There was a problem hiding this comment.
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).
| int arr[3]; | |
| arr[2]=7; | |
| arr[4] = 10; | |
| if(arr[2]==5) { | |
| printf("\n Value 5\n"); | |
| } else { | |
| printf("\n Value NONE\n"); | |
| } |
|
|
||
| int arr[3]; | ||
| arr[2]=7; | ||
| arr[4] = 10; |
There was a problem hiding this comment.
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
Code changes made to check coverity for DM CLI Component