Skip to content

MDEV-40103 Initialise thd->net in spider_create_sys_thd#5302

Merged
mariadb-YuchenPei merged 1 commit into
10.11from
bb-10.11-mdev-40103
Jun 30, 2026
Merged

MDEV-40103 Initialise thd->net in spider_create_sys_thd#5302
mariadb-YuchenPei merged 1 commit into
10.11from
bb-10.11-mdev-40103

Conversation

@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor

This fixes an msan uninitialized bug

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mariadb-YuchenPei mariadb-YuchenPei changed the base branch from main to 10.11 June 30, 2026 00:44

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces a call to my_net_init to initialize the network structure for a newly created system thread in spider_create_sys_thd. The review feedback points out that my_net_init can fail and its return value should be checked to handle failures gracefully, preventing potential crashes or undefined behavior.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread storage/spider/spd_table.cc Outdated
@mariadb-YuchenPei mariadb-YuchenPei force-pushed the bb-10.11-mdev-40103 branch 2 times, most recently from a485de5 to 1b346f4 Compare June 30, 2026 00:48
@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request adds network initialization to the system thread creation process in spider_create_sys_thd by calling my_net_init and handling its failure. The feedback suggests improving code style and readability by replacing the explicit cast (st_vio*) 0 with NULL and fixing a minor spacing issue in the function call.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread storage/spider/spd_table.cc Outdated
@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request updates spider_create_sys_thd in storage/spider/spd_table.cc to initialize the network buffer of the newly created thread using my_net_init. If the initialization fails, the thread is properly destroyed and NULL is returned. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@grooverdan grooverdan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just improved commit messgage.

net is used by THD::print_aborted_warning when threads are killed so this needed to be initalized.

net is used by THD::print_aborted_warning when threads are killed so
this needed to be initalised.

This fixes an msan "uninitialized value" bug
@mariadb-YuchenPei

Copy link
Copy Markdown
Contributor Author

Just improved commit messgage.

net is used by THD::print_aborted_warning when threads are killed so this needed to be initalized.

Thanks, done

@mariadb-YuchenPei mariadb-YuchenPei enabled auto-merge (rebase) June 30, 2026 03:17
@mariadb-YuchenPei mariadb-YuchenPei merged commit b9e7173 into 10.11 Jun 30, 2026
15 of 17 checks passed
@mariadb-YuchenPei mariadb-YuchenPei deleted the bb-10.11-mdev-40103 branch June 30, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants