Bug #89603 ld=gold and -ffunction-sections produces invalid code
Submitted: 9 Feb 2018 11:46 Modified: 16 Mar 2018 1:50
Reporter: Tor Didriksen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.5 OS:Any
Assigned to: CPU Architecture:Any

[9 Feb 2018 11:46] Tor Didriksen
Description:
After this push
commit 134da3918c96f9ba87b2341b7274cf0bf36c462a (origin/mysql-trunk-wl8383+wl9465)
Author: Gleb Shchepa <gleb.shchepa@oracle.com>
Date:   Thu Jan 25 23:07:25 2018 +0400

    WL#9465: Removal of the MAXDB sql_mode.
    WL#8383 -- follow up tasks to cleanup the rest.

Several tests fail in optimized mode with gcc 7 and gcc 8

The reason it triggered for this push was that this is the first
time dd version != i_s version  

How to repeat:
Build with gcc 7 or gcc 8 in release mode (without debug)

Failing test(s): innodb.log_encrypt_2 main.partition_column main.mysqlpump_charset innodb.innodb-wl6445-2 rpl_gtid.rpl_pump rpl.rpl_gis_ddl innodb.log_encrypt_6 sysschema.v_schema_object_overview i_innodb.innodb_bug19265668 sysschema.v_schema_redundant_indexes main.mysqldump x.admin_list_objects_docpath main.information_schema innodb.innodb-wl6445 main.mysqlpump_partial_bkp i_innodb.innodb_bug16083211 i_innodb.innodb-force-recovery-3 innodb.innodb_force_recovery main.populate_collations_read_only perfschema.statement_program_lost_inst binlog_gtid.binlog_gtid_mysqlpump main.gis i_innodb.innodb-force-recovery-4 innodb.create_tablespace main.mysqlpump_extended innodb.table_encrypt_2 main.dd_is_compatibility_cs i_innodb.innodb_bug16631778 main.mysqlpump_concurrency sysschema.v_schema_unused_indexes innodb.readonly main.mysqlpump_bugs gis.ddl main.mysqlpump_basic innodb.innodb_bug-13628249 innodb.log_file_system innodb.alter_kill innodb.undo_settings innodb.temporary_table innodb.optimizer_temporary_table

Suggested fix:
Disable -ffunction-sections for standard optimized build, and for LINK_RANDOMIZE
[16 Mar 2018 1:50] Paul DuBois
Posted by developer:
 
Fixed in 8.0.11.

Bug affects no released version. No changelog entry needed.