In src/client/client_cli.c:14-15, two global variables are defined:
char*server_host="127.0.0.1";intserver_port=8080;
These globals are:
Mutable (not const) -- they can be modified by --server-host and --server-port CLI args
Shared across all threads -- both single-threaded and multithreaded send paths call into client_send.c which reads these globals
Used in send_chunks_multithreaded (client_send.c:194,204) from the sender thread
This is not currently a data race because only the main thread modifies them before threads are created, but the design is fragile. Adding any feature that dynamically changes connection parameters could introduce threading bugs.
Better design: Pass server_host and server_port through the Config struct instead of using globals. The Config struct already exists and is passed through the pipeline context.
Severity: low
In src/client/client_cli.c:14-15, two global variables are defined:
```c
char* server_host = "127.0.0.1";
int server_port = 8080;
```
These globals are:
1. Mutable (not const) -- they can be modified by --server-host and --server-port CLI args
2. Shared across all threads -- both single-threaded and multithreaded send paths call into client_send.c which reads these globals
3. Used in send_chunks_multithreaded (client_send.c:194,204) from the sender thread
This is not currently a data race because only the main thread modifies them before threads are created, but the design is fragile. Adding any feature that dynamically changes connection parameters could introduce threading bugs.
Better design: Pass server_host and server_port through the Config struct instead of using globals. The Config struct already exists and is passed through the pipeline context.
Severity: low
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
In src/client/client_cli.c:14-15, two global variables are defined:
These globals are:
This is not currently a data race because only the main thread modifies them before threads are created, but the design is fragile. Adding any feature that dynamically changes connection parameters could introduce threading bugs.
Better design: Pass server_host and server_port through the Config struct instead of using globals. The Config struct already exists and is passed through the pipeline context.
Severity: low