Repository: rust
Issue: 1.55.0 segfault compiling stage1 rustc_codegen_llvm on powerpc64le
Labels: A-LLVM,T-compiler,O-PowerPC,C-bug

Failure log (warning very large): [1.55](https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=ppc64el&ver=1.55.0%2Bdfsg1-1%7Eexp1&stamp=1633885819&raw=0)

There was no failure on [1.54](https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=ppc64el&ver=1.54.0%2Bdfsg1-3&stamp=1633786556&raw=0); the same version of LLVM was used in both cases - 12.0.1 (Debian version 1:12.0.1-9)

The only change made to rustc_codegen_llvm between 1.54 and 1.55 was #86416 so CC @Amanieu .

There was a later MR #88350 to fix something on powerpc64, however this just mentions "lack of support" rather than a segfault, so I don't know if this is related. Shall I try backporting it onto 1.55 in the meantime?

I will continue trying to debug the segfault.

The output contains the following stack-trace-like dump, not sure if it's useful:

~~~~
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x786b6c)[0x7fffa65f6b6c]
linux-vdso64.so.1(__kernel_sigtramp_rt64+0x0)[0x7fffaa190514]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x2b16f64)[0x7fffa8986f64]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0xc433c)[0x7fff87f7433c]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0xb1e50)[0x7fff87f61e50]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(_ZN10proc_macro12token_stream95_$LT$impl$u20$core..iter..traits..collect..IntoIterator$u20$for$u20$proc_macro..TokenStream$GT$9
into_iter17h32ab5102ba0e87e0E+0x28)[0x7fff87f47978]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(_ZN91_$LT$proc_macro2..imp..TokenStream$u20$as$u20$core..iter..traits..collect..IntoIterator$GT$9into_iter17h2efdc81b2e8ae367E+
0x1e0)[0x7fff87f35280]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(_ZN11proc_macro212token_stream96_$LT$impl$u20$core..iter..traits..collect..IntoIterator$u20$for$u20$proc_macro2..TokenStream$GT
$9into_iter17h315ff4dea038bfc3E+0x54)[0x7fff87f3ab84]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0x6a200)[0x7fff87f1a200]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0x6bfa0)[0x7fff87f1bfa0]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0x6dbf8)[0x7fff87f1dbf8]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0x6e654)[0x7fff87f1e654]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1-rustc/release/deps/libcstr-786feb209dfce7ae.so(+0x6d478)[0x7fff87f1d478]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x2a474f0)[0x7fffa88b74f0]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(_ZN89_$LT$rustc_expand..proc_macro..BangProcMacro$u20$as$u20$rustc_expand..base..ProcMacro$GT$6expand17h4da03810eb58a713E+0x12c)[0x7ff
fa889171c]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(_ZN12rustc_expand6expand13MacroExpander21fully_expand_fragment17hf42bf6c7c5cee112E+0x17f0)[0x7fffa8875590]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(_ZN12rustc_expand6expand13MacroExpander12expand_crate17h900deade1746e5d6E+0x6e0)[0x7fffa8873540]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x855080)[0x7fffa66c5080]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x88ed34)[0x7fffa66fed34]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(_ZN15rustc_interface7queries7Queries9expansion17h4bcb4cf9c0b271cfE+0x38c)[0x7fffa672a07c]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x6fd664)[0x7fffa656d664]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x6e53fc)[0x7fffa65553fc]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x6fed88)[0x7fffa656ed88]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x6f59a8)[0x7fffa65659a8]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x75d010)[0x7fffa65cd010]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/librustc_driver-8a51db685c3a3652.so(+0x6db274)[0x7fffa654b274]
/<<PKGBUILDDIR>>/build/powerpc64le-unknown-linux-gnu/stage1/lib/libstd-5259f91ddc4e5b37.so(rust_metadata_std_f9b0c9e9385aeadc6c2155a37e531624+0x8df54)[0x7fffa5ccdf54]
/lib/powerpc64le-linux-gnu/libpthread.so.0(+0x90a4)[0x7fff9f5e90a4]
/lib/powerpc64le-linux-gnu/libc.so.6(clone+0x74)[0x7fffa5b4d054]
~~~~