Fedora Account System
Red Hat Associate
Red Hat Customer
[root@be93f8fff8c3 simple-dns]# git remote -v origin https://github.com/balliegojr/simple-dns (fetch) origin https://github.com/balliegojr/simple-dns (push) [root@be93f8fff8c3 simple-dns]# cargo build --release Compiling simple-dns v0.12.0 (/simple-dns/simple-dns) Type too small for ZExt %1097 = zext i128 %1096 to i96 in function _RNvNtNtCs3AZc6le8oaU_10simple_dns3dns5rdata11parse_rdata rustc-LLVM ERROR: Broken function found, compilation aborted! error: could not compile `simple-dns` (lib) Caused by: process didn't exit successfully: `rustc --crate-name simple_dns --edition=2021 simple-dns/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=117 --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("alloc", "default", "std"))' -C metadata=2e6bbbbb97992d8e -C extra-filename=-07d68c6fb46cf820 --out-dir /simple-dns/target/release/deps -C strip=debuginfo -L dependency=/simple-dns/target/release/deps --extern bitflags=/simple-dns/target/release/deps/libbitflags-3d90d42037c02fb4.rmeta` (exit status: 101) Same code builds just fine with rust toolchain downloaded with rustup. Also, this appears to not be a problem on f43? https://copr.fedorainfracloud.org/coprs/luk1337/test/build/10840400/ it built correctly there. Reproducible: Always Steps to Reproduce: Build simple-dns (https://github.com/balliegojr/simple-dns) Actual Results: Fails to build. Expected Results: Builds.
> Also, this appears to not be a problem on f43? F43 used LLVM 21, while 44 and 45 (rawhide) used LLVM 22. Given that the error is also from LLVM, it seems likely that it's an LLVM regression, although sometimes rustc does adjust its part in codegen to adapt to different LLVM versions too. I'll dig a bit and see if I can get an LLVM-IR reproducer, and possibly reduce it.
Reduced IR below, and opt -O2 creates that bogus "zext i128 %N to i96". I can reproduce this even several LLVM versions back, so it must be some other perturbation that let F43 work in the original build. However, LLVM 23 builds fine! Cherry-picking llvm#207229 to LLVM 22 fixes the reducer for me, as well as the original IR saved from rustc simple-dns. I'm currently building the llvm package to test this with the full simple-dns build, and if that works I'll post a PR. --- ; ModuleID = '<stdin>' target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" target triple = "s390x-unknown-linux-gnu" define fastcc void @_RNvNtNtCs1BZm78KmNte_10simple_dns3dns5rdata11parse_rdata(ptr %0, i1 %cond, ptr %1) #0 { br i1 %cond, label %3, label %11 3: ; preds = %2 %4 = getelementptr i8, ptr %1, i64 8 %5 = load i64, ptr %1, align 8 %6 = zext i64 %5 to i96 %7 = shl i96 %6, 64 %8 = load i64, ptr %4, align 8 %9 = zext i64 %8 to i96 %10 = or i96 %7, %9 br label %11 11: ; preds = %3, %2 %12 = phi i96 [ %10, %3 ], [ 0, %2 ] %13 = zext i96 %12 to i128 store i128 %13, ptr %0, align 8 ret void } attributes #0 = { "target-cpu"="z15" }
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle. Changing version to 45.
FEDORA-2026-1e6b58476a (llvm-22.1.8-26.fc46) has been submitted as an update to Fedora 46. https://bodhi.fedoraproject.org/updates/FEDORA-2026-1e6b58476a
FEDORA-2026-1e6b58476a (llvm-22.1.8-26.fc46) has been pushed to the Fedora 46 stable repository. If problem still persists, please make note of it in this bug report.