Skip to content

Fix garbage pointer for lat_rpc -S localhost#45

Open
bkuhls wants to merge 1 commit into
intel:masterfrom
bkuhls:lat_rpc
Open

Fix garbage pointer for lat_rpc -S localhost#45
bkuhls wants to merge 1 commit into
intel:masterfrom
bkuhls:lat_rpc

Conversation

@bkuhls

@bkuhls bkuhls commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

This patch is used by buildroot:
https://gitlab.com/buildroot.org/buildroot/-/commit/e1137c06a0db69ba0724f22cd09ea92b82ac59a6

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a crash/undefined behavior in lat_rpc when invoked in shutdown mode (-S) by ensuring state.server is not left uninitialized.

Changes:

  • Initialize state.server to NULL in main() to avoid use of an uninitialized pointer.

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

Comment thread src/lat_rpc.c
char *usage = "-s\n OR [-p <tcp|udp>] [-P parallel] [-W <warmup>] [-N <repetitions>] serverhost\n OR -S serverhost\n";

state.msize = 1;
state.server = NULL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants