Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc 1.32 using system LLVM crashes while building the resvg crate #57762

Closed
RazrFalcon opened this issue Jan 19, 2019 · 20 comments · Fixed by #57840
Closed

rustc 1.32 using system LLVM crashes while building the resvg crate #57762

RazrFalcon opened this issue Jan 19, 2019 · 20 comments · Fixed by #57840
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-linux Operating system: Linux regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@RazrFalcon
Copy link

RazrFalcon commented Jan 19, 2019

Initial issue: RazrFalcon/resvg#110

   Compiling resvg-capi v0.5.0 (/home/user/.cache/pikaur/build/resvg-git/src/resvg/capi)
error: Could not compile `resvg-capi`.

Caused by:
  process didn't exit successfully: `rustc --crate-name resvg capi/src/lib.rs --color always --crate-type cdylib --crate-type staticlib --emit=dep-info,link -C opt-level=3 -C lto --cfg 'feature="cairo-backend"' --cfg 'feature="cairo-sys-rs"' --cfg 'feature="glib"' --cfg 'feature="qt-backend"' --cfg 'feature="resvg"' -C metadata=34044ee5526873f1 --out-dir /home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps -L dependency=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps --extern cairo_sys=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libcairo_sys-a11059b04a916894.rlib --extern fern=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libfern-f758ae3d5f3ac504.rlib --extern glib=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libglib-42c67ca816dc468b.rlib --extern log=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/liblog-4fed47ee5064f102.rlib --extern resvg=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/deps/libresvg-9bfdf02a73881248.rlib -L native=/home/user/.cache/pikaur/build/resvg-git/src/resvg/target/release/build/resvg-qt-529ad70e8602e985/out` (signal: 11, SIGSEGV: invalid memory reference)

Steps to reproduce:

sudo pacman -S rust
git clone https://github.com/RazrFalcon/resvg.git
cd resvg/capi
cargo build --release

The master branch can be built without rustc crashing on Gentoo and on Travis (Ubuntu 14.04.5 LTS).

UPD: I've tried to build it too and I have the same error. Looks like something wrong with the Arch's rustc. Because if we use the one installed via rustup - everything is ok.

UPD: it can be fixed by disabling the LTO, which is enabled by default for resvg.

@jonas-schievink
Copy link
Contributor

Arch uses this build config for packaging fwiw:

[llvm]
link-shared = true

[build]
cargo = "/usr/bin/cargo"
rustc = "/usr/bin/rustc"
python = "python2.7"
extended = true
sanitizers = false

[install]
prefix = "/usr"

[rust]
# 0 or the new default of 16 is faster, but can result in worse performance
# https://github.com/rust-lang/rust/issues/47745
codegen-units = 1

debuginfo = true
debuginfo-lines = true

channel = "stable"

rpath = false

[target.x86_64-unknown-linux-gnu]
llvm-config = "/usr/bin/llvm-config"

@sfackler
Copy link
Member

Arch's build uses the system LLVM, while rustup's uses a bundled one, so the problem is probably due to an LLVM bug that's only present in Arch's version.

@Centril Centril added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-linux Operating system: Linux regression-from-stable-to-stable Performance or correctness regression from one stable version to another. I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 19, 2019
@Centril
Copy link
Contributor

Centril commented Jan 19, 2019

Tentatively labeling as I-unsound due to "invalid memory reference".

@sfackler
Copy link
Member

That's how LLVM asserts look when built without debug check enabled.

@Centril Centril removed the I-unsound Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness label Jan 19, 2019
@nikic
Copy link
Contributor

nikic commented Jan 19, 2019

Could you please provide a backtrace for the segfault?

@RazrFalcon
Copy link
Author

@nikic How can I do this?

@hellow554
Copy link
Contributor

set RUST_BACKTRACE=1 as an environment variable that your packagemanager will respect

@RazrFalcon
Copy link
Author

@hellow554 It doesn't make any difference. I've also tried RUST_LOG=debug, but nothing interesting there either. Looks like rustc was stripped.

@nikic
Copy link
Contributor

nikic commented Jan 21, 2019

I'm not sure what the canonical way to do this, but I'd just take the rustc command cargo printed out and run it under gdb via gdb --args rustc .... Then r and once it crashes bt.

@mati865
Copy link
Contributor

mati865 commented Jan 21, 2019

RUST_BACKTRACE won't show anything because rustc doesn't panic.
Backtrace from crashed thread in Arch:

[Switching to Thread 0x7fffeb9bd700 (LWP 1464)]
0x00007ffff2cf735c in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
(gdb) bt
#0  0x00007ffff2cf735c in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#1  0x00007ffff2cf72a5 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#2  0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#3  0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#4  0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#5  0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#6  0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#7  0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#8  0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#9  0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#10 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#11 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#12 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#13 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#14 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#15 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#16 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#17 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#18 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#19 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#20 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#21 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#22 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#23 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#24 0x00007ffff2cf9ac3 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#25 0x00007ffff2cf75dd in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#26 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#27 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#28 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#29 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#30 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#31 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#32 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#33 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#34 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#35 0x00007ffff2cf9ac3 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#36 0x00007ffff2cf75dd in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#37 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#38 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#39 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#40 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#41 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#42 0x00007ffff2cf9ac3 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#43 0x00007ffff2cf75dd in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#44 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#45 0x00007ffff2cf9284 in llvm::DwarfUnit::constructMemberDIE(llvm::DIE&, llvm::DIDerivedType const*) () from /usr/lib/libLLVM-7.so
#46 0x00007ffff2cf7105 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#47 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#48 0x00007ffff2cf6f56 in llvm::DwarfUnit::constructTypeDIE(llvm::DIE&, llvm::DICompositeType const*) () from /usr/lib/libLLVM-7.so
#49 0x00007ffff2cf75f1 in llvm::DwarfUnit::getOrCreateTypeDIE(llvm::MDNode const*) () from /usr/lib/libLLVM-7.so
#50 0x00007ffff2cf7615 in llvm::DwarfUnit::addType(llvm::DIE&, llvm::DIType const*, llvm::dwarf::Attribute) () from /usr/lib/libLLVM-7.so
#51 0x00007ffff2cd350a in llvm::DwarfCompileUnit::getOrCreateGlobalVariableDIE(llvm::DIGlobalVariable const*, llvm::ArrayRef<llvm::DwarfCompileUnit::GlobalExpr>) () from /usr/lib/libLLVM-7.so
#52 0x00007ffff2cebd13 in llvm::DwarfDebug::beginModule() () from /usr/lib/libLLVM-7.so
#53 0x00007ffff2cb01f9 in llvm::AsmPrinter::doInitialization(llvm::Module&) () from /usr/lib/libLLVM-7.so
#54 0x00007ffff26aec46 in llvm::FPPassManager::doInitialization(llvm::Module&) () from /usr/lib/libLLVM-7.so
#55 0x00007ffff26b9a06 in llvm::legacy::PassManagerImpl::run(llvm::Module&) () from /usr/lib/libLLVM-7.so
#56 0x00007ffff5e6aa9a in LLVMRustWriteOutputFile () from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#57 0x00007ffff5e0369c in ?? () from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#58 0x00007ffff5e05960 in ?? () from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#59 0x00007ffff5e5b1f1 in <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::write::WriteBackendMethods>::codegen ()
   from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#60 0x00007ffff5d8a98c in ?? () from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#61 0x00007ffff5d8c459 in ?? () from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#62 0x00007ffff7db07ba in __rust_maybe_catch_panic () from /usr/lib/libstd-3572d7be0ebc7029.so
#63 0x00007ffff5db5b18 in ?? () from /usr/lib64/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
#64 0x00007ffff7da69ae in ?? () from /usr/lib/libstd-3572d7be0ebc7029.so
#65 0x00007ffff6113a9d in start_thread () from /usr/lib/libpthread.so.0
#66 0x00007ffff7c65b23 in clone () from /usr/lib/libc.so.6

@nikic nikic changed the title rustc 1.32 crashes on Arch Linux while building the resvg crate rustc 1.32 using system LLVM crashes while building the resvg crate Jan 21, 2019
@nikic
Copy link
Contributor

nikic commented Jan 21, 2019

Doesn't look familiar to me, maybe @tromey has seen this trace before?

@Mic92
Copy link
Contributor

Mic92 commented Jan 21, 2019

This is also downstram tracked for archlinux (#61490) and NixOS (#54323)

Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 21, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>
@foutrelis
Copy link

Seems to be fixed by backporting:

@cuviper
Copy link
Member

cuviper commented Jan 21, 2019

I'm investigating this for Fedora too: https://bugzilla.redhat.com/show_bug.cgi?id=1668033

@foutrelis Thanks for identifying those patches -- I will definitely try that next!

@cuviper
Copy link
Member

cuviper commented Jan 21, 2019

I confirmed that the discriminator patch fixes it, thanks again!

That's already in rust/src/llvm, of course. The remaining question here is whether rustc should disable the new enum DWARF for external LLVM7, as I had bisected this to 71ce4c3. Or we can just let this issue serve as notice that this LLVM patch is needed for those that use external LLVM.

lblasc added a commit to lblasc/nixpkgs that referenced this issue Jan 22, 2019
@kyrias
Copy link
Contributor

kyrias commented Jan 22, 2019

If that's going to be a requirement, it feels really disingenuous for LLVM 6 be the claimed minimum supported LLVM version.

The earliest actually supported upstream release should be what check_llvm_version actually checks for, and then if distros using older versions are okay with patching their LLVM, they can just disable the version check. (And if that's going to be supported, it would be nice to keep some kind of list of patches that are required for those.)

@tromey
Copy link
Contributor

tromey commented Jan 22, 2019

If that's going to be a requirement, it feels really disingenuous for LLVM 6 be the claimed minimum supported LLVM version.

The code in rustc has a fallback for earlier versions of LLVM. The problem here, instead, is that the fallback is not used by LLVM 7, but unfortunately LLVM 7 was released without a necessary bug fix.

Changing the fallback to check for "LLVM >= 8 or Rust LLVM" would be fine. See https://github.com/rust-lang/rust/blob/master/src/librustc_codegen_llvm/debuginfo/metadata.rs#L1163-L1168

@tromey
Copy link
Contributor

tromey commented Jan 22, 2019

I have a patch for this, will submit shortly.

@tromey
Copy link
Contributor

tromey commented Jan 22, 2019

The main issue with the patch is that if your system LLVM has the fix, then you'll have to patch rustc to back out this workaround; or else have worse debuginfo for enums.

@cuviper
Copy link
Member

cuviper commented Jan 22, 2019

Yeah, it's not obvious what the right answer should be. But since this causes a hard SIGSEGV, it probably is better to take the conservative stance, assuming LLVM7 is unpatched. I will plan on patching Fedora rustc to re-enable this, having patched LLVM already.

Centril added a commit to Centril/rust that referenced this issue Jan 23, 2019
Fix issue 57762

against a stock LLVM 7.  LLVM 7 was released without a necessary fix
for a bug in the DWARF discriminant code.

This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.

Closes rust-lang#57762
@bors bors closed this as completed in 1c95f5a Jan 24, 2019
pietroalbini pushed a commit to pietroalbini/rust that referenced this issue Jan 24, 2019
Issue 57762 points out a compiler crash when the compiler was built
using a stock LLVM 7.  LLVM 7 was released without a necessary fix for
a bug in the DWARF discriminant code.

This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.

Closes rust-lang#57762
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 24, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
Cogitri pushed a commit to Cogitri/void-packages that referenced this issue Jan 26, 2019
* Add support for all ppc64 targets.
* Use bundled LLVM instead of system wide LLVM. Rust statically
  links against LLVM anyway and we can avoid some bugs this way
  (such as Rust failing to compile Firefox, see
  rust-lang/rust#57762

Co-authored-by: q66 <daniel@octaforge.org>

[ci skip]
bob-beck pushed a commit to openbsd/ports that referenced this issue Jan 30, 2019
- llvm-mirror/llvm@da1fb72
- llvm-mirror/llvm@cc1f2a5

it should unbreak firefox: firefox uses rustc with `-C lto' option for
some part of its build, and this code path expose the llvm bug.

llvm review: https://reviews.llvm.org/D52340
rust issue: rust-lang/rust#57762

bump lang/rust to ensure updated statically linked libraries are taken on update.

ok jca@
VardhanThigle pushed a commit to jethrogb/rust that referenced this issue Jan 31, 2019
Issue 57762 points out a compiler crash when the compiler was built
using a stock LLVM 7.  LLVM 7 was released without a necessary fix for
a bug in the DWARF discriminant code.

This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.

Closes rust-lang#57762
vcunat pushed a commit to NixOS/nixpkgs that referenced this issue Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-linux Operating system: Linux regression-from-stable-to-stable Performance or correctness regression from one stable version to another. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.