rtl8852au
rtl8852au copied to clipboard
GCC kernel plugin "Randomize layout of sensitive kernel structures" makes the build abort with an ICE
With "Randomize layout of sensitive kernel structures" (GCC plugins) turned on in the kernel configuration, the compilation terminates with a GCC Internal Compiler Error:
# make CROSS_COMPILE=x86_64-pc-linux-gnu-
#rm -f .symvers.8852au
make ARCH=x86_64 CROSS_COMPILE=x86_64-pc-linux-gnu- -C /lib/modules/5.17.14-gentoo-x86_64/build M=/usr/src/rtl8852au modules
make[1]: Entering directory '/usr/src/linux-5.17.14-gentoo'
CC [M] /usr/src/rtl8852au/os_dep/osdep_service.o
(....)
CC [M] /usr/src/rtl8852au/phl/phl_init.o
CC [M] /usr/src/rtl8852au/phl/phl_debug.o
CC [M] /usr/src/rtl8852au/phl/phl_tx.o
CC [M] /usr/src/rtl8852au/phl/phl_rx.o
‘void (*)(_adapter *)
Internal compiler error: Error reporting routines re-entered.
CC [M] /usr/src/rtl8852au/phl/phl_rx_agg.o
CC [M] /usr/src/rtl8852au/phl/phl_api_drv.o
CC [M] /usr/src/rtl8852au/phl/phl_role.o
CC [M] /usr/src/rtl8852au/phl/phl_sta.o
CC [M] /usr/src/rtl8852au/phl/phl_mr.o
CC [M] /usr/src/rtl8852au/phl/phl_sec.o
CC [M] /usr/src/rtl8852au/phl/phl_chan.o
CC [M] /usr/src/rtl8852au/phl/phl_sw_cap.o
CC [M] /usr/src/rtl8852au/phl/phl_util.o
CC [M] /usr/src/rtl8852au/phl/phl_pkt_ofld.o
0x610da5 build_type_attribute_qual_variant(tree_node*, tree_node*, int)
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/attribs.c:1144
0x6517a4 get_aka_type
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-objc-common.c:111
0x651854 get_aka_type
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-objc-common.c:158
0x6517a4 get_aka_type
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-objc-common.c:111
0x651c70 print_type
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-objc-common.c:210
0x6520c7 c_tree_printer
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-objc-common.c:316
0x6520c7 c_tree_printer
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-objc-common.c:260
0x167ea7c pp_format(pretty_printer*, text_info*)
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/pretty-print.c:1475
0x1671c06 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/diagnostic.c:1244
0x16741e9 diagnostic_impl
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/diagnostic.c:1406
0x16741e9 warning_at(unsigned int, int, char const*, ...)
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/diagnostic.c:1543
0x645789 build_c_cast(unsigned int, tree_node*, tree_node*)
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-typeck.c:6085
0x646094 c_cast_expr(unsigned int, c_type_name*, tree_node*)
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-typeck.c:6164
0x6635d4 c_parser_cast_expression
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:8063
0x663772 c_parser_binary_expression
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:7874
0x664b78 c_parser_conditional_expression
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:7597
0x665179 c_parser_expr_no_commas
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:7512
0x656a4f c_parser_expr_list
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:10735
0x66640d c_parser_postfix_expression_after_primary
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:10442
0x65e263 c_parser_postfix_expression
/usr/src/debug/sys-devel/gcc-11.3.0/gcc-11.3.0/gcc/c/c-parser.c:10145
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make[2]: *** [scripts/Makefile.build:288: /usr/src/rtl8852au/core/rtw_trx_usb.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1831: /usr/src/rtl8852au] Error 2
make[1]: Leaving directory '/usr/src/linux-5.17.14-gentoo'
make: *** [Makefile:629: modules] Error 2
Perfectly reproducible with branch "dwa-x1850" at commit 1e9a9b1156f7bb7b38c6fe667429740757969835 Tested with Linux 5.17.14 + Gentoo patches, and GCC 11.3.0 Disabling the "Randomize layout of sensitive kernel structures" GCC plugin solved the issue for me. No bug report submitted yet.