https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109505
Bug ID: 109505 Summary: Compiler loops forever to OOM while compiling evaluate_prg_hwy.cc in Chromium Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jdapena at igalia dot com Target Milestone: --- Steps to reproduce: 1. Install kas tool 2. Clone https://github.com/Igalia/meta-chromium 3. Kick checkout of repositories: kas checkout kas/chromium.yml:kas/commercial.yml 3. Kick build for raspberrypi4-64: KAS_MACHINE=raspberrypi4-64 kas build kas/chromium.yml:kas/commercial.yml Compilation will progress, but then fail on building Chromium: FAILED: obj/third_party/distributed_point_functions/distributed_point_functions/evaluate_prg_hwy.o aarch64-poky-linux-g++ -mcpu=cortex-a72 -march=armv8-a+crc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/recipe-sysroot -MMD -MF obj/third_party/distributed_point_functions/distributed_point_functions/evaluate_prg_hwy.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_56 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_56 -DBASE_USE_PERFETTO_CLIENT_LIBRARY=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DGOOGLE_PROTOBUF_INTERNAL_DONATE_STEAL_INLINE=0 -DHAVE_PTHREAD -I../chromium-114.0.5696.0 -Igen -I../chromium-114.0.5696.0/third_party/distributed_point_functions -I../chromium-114.0.5696.0/third_party/distributed_point_functions/code -Igen/third_party/distributed_point_functions -I../chromium-114.0.5696.0/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -I../chromium-114.0.5696.0/third_party/protobuf/src -Igen/protoc_out -I../chromium-114.0.5696.0/third_party/abseil-cpp -I../chromium-114.0.5696.0/third_party/highway/src -I../chromium-114.0.5696.0/third_party/boringssl/src/include -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -mbranch-protection=standard -O2 -fdata-sections -ffunction-sections -fno-omit-frame-pointer -gdwarf-4 -g1 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -Wno-comments -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -I/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/recipe-sysroot/usr/include/glib-2.0 -I/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/recipe-sysroot/usr/lib/glib-2.0/include -std=gnu++2a -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wno-narrowing -Wno-class-memaccess -feliminate-unused-debug-types -fmacro-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/chromium-114.0.5696.0=/usr/src/debug/chromium-dev/114.0.5696.0-r0 -fdebug-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/chromium-114.0.5696.0=/usr/src/debug/chromium-dev/114.0.5696.0-r0 -fmacro-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/build=/usr/src/debug/chromium-dev/114.0.5696.0-r0 -fdebug-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/build=/usr/src/debug/chromium-dev/114.0.5696.0-r0 -fdebug-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/recipe-sysroot= -fmacro-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/dape/Development/yocto/meta-chromium/build/tmp/work/cortexa72-poky-linux/chromium-dev/114.0.5696.0-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -c ../chromium-114.0.5696.0/third_party/distributed_point_functions/code/dpf/internal/evaluate_prg_hwy.cc -o obj/third_party/distributed_point_functions/distributed_point_functions/evaluate_prg_hwy.o {standard input}: Assembler messages: {standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive aarch64-poky-linux-g++: fatal error: Killed signal terminated program cc1plus compilation terminated. ninja: build stopped: subcommand failed. WARNING: exit code 1 from a shell command. This is after exhausting all the available memory in system. Attaching gdb to GCC I see it fails to finish running pass_forwprop::execute in this backtrace: #0 (anonymous namespace)::pass_forwprop::execute (this=<optimized out>, fun=<optimized out>) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/tree-ssa-forwprop.cc:3636 #1 0x0000000000d0b653 in execute_one_pass (pass=0x2f96120) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/passes.cc:2638 #2 0x0000000000d0bea0 in execute_pass_list_1 (pass=0x2f96120) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/passes.cc:2738 #3 0x0000000000d0beb2 in execute_pass_list_1 (pass=0x2f951b0) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/passes.cc:2739 #4 0x0000000000d0bedd in execute_pass_list (fn=0x7fe3397a88a0, pass=<optimized out>) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/passes.cc:2749 #5 0x00000000009b7e28 in cgraph_node::expand (this=0x7fe331da2990) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/context.h:48 #6 cgraph_node::expand (this=0x7fe331da2990) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/cgraphunit.cc:1788 #7 0x00000000009b9387 in expand_all_functions () at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/cgraphunit.cc:1999 #8 symbol_table::compile (this=0x7fe33ffa3000) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/cgraphunit.cc:2349 #9 0x00000000009bb91c in symbol_table::compile (this=0x7fe33ffa3000) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/cgraphunit.cc:2262 #10 symbol_table::finalize_compilation_unit (this=0x7fe33ffa3000) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/cgraphunit.cc:2530 #11 0x0000000000ddcbca in compile_file () at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/toplev.cc:479 #12 0x00000000006c8a8e in do_compile (no_backend=false) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/toplev.cc:2144 #13 toplev::main (this=this@entry=0x7fffd81b45d6, argc=<optimized out>, argc@entry=140, argv=<optimized out>, argv@entry=0x7fffd81b4708) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/toplev.cc:2296 #14 0x00000000006ca1af in main (argc=140, argv=0x7fffd81b4708) at ../../../../../../../work-shared/gcc-12.2.0-r0/gcc-12.2.0/gcc/main.cc:39 Apparently the loop will never finish as gsi gets members added and removed forever before OOM.