Bug #111430 Case rpl.rpl_plugin_load cause crash when build with -DWITH_LTO=1
Submitted: 15 Jun 2023 7:21 Modified: 5 Jul 2023 2:08
Reporter: George Ma (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Replication Severity:S6 (Debug Builds)
Version:8.0.33 OS:Linux (5.10)
Assigned to: CPU Architecture:ARM

[15 Jun 2023 7:21] George Ma
Build mysql with source code (-DWITH_LTO=1 & -DCMAKE_BUILD_TYPE="Debug") and then run mtr cases, found case rpl.rpl_plugin_load can cause crash.

How to repeat:
Build mysql with -DWITH_LTO=1 & -DCMAKE_BUILD_TYPE="Debug" and run mtr cases.
[15 Jun 2023 7:21] George Ma
Bellow is my build script

Attachment: build-mini.sh (text/x-sh), 2.04 KiB.

[15 Jun 2023 11:11] MySQL Verification Team
Hello George Ma,

Thank you for the report and feedback.
Verified as described.

[15 Jun 2023 11:41] MySQL Verification Team
8.0.33 test results

Attachment: 111430.build (application/octet-stream, text), 648.70 KiB.

[5 Jul 2023 2:08] George Ma
This problem disappeared if I changed `COMMON_FLAGS="-O0 -g -fexceptions -fno-strict-aliasing"` to `COMMON_FLAGS="-O3 -g -fexceptions -fno-strict-aliasing"` (change from O0 to O3).

Actually, O3 means higher level compile optimization, but the result just shows O3 can succeed but O0 crash.