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

1.45.0 regression asm-related ICE in tests on non-x86 #75220

Closed
infinity0 opened this issue Aug 6, 2020 · 3 comments · Fixed by #75227
Closed

1.45.0 regression asm-related ICE in tests on non-x86 #75220

infinity0 opened this issue Aug 6, 2020 · 3 comments · Fixed by #75227
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. F-asm `#![feature(asm)]` (not `llvm_asm`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@infinity0
Copy link
Contributor

e.g. s390x mips64el ppc64

test [ui] ui/feature-gates/feature-gate-asm.rs ... FAILED
test [ui] ui/feature-gates/feature-gate-asm2.rs ... FAILED
test [pretty] pretty/asm.rs ... FAILED

CC @Amanieu

failures:

---- [ui] ui/feature-gates/feature-gate-asm.rs stdout ----


executing "/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/stage2/bin/rustc" "/<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs" "-Zthreads=1" "--target=mips64el-unknown-linux-gnuabi64" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/test/ui/feature-gates/feature-gate-asm" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/native/rust-test-helpers" "-Clinker=mips64el-linux-gnuabi64-gcc" "-L" "/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/test/ui/feature-gates/feature-gate-asm/auxiliary"
------stdout------------------------------

------stderr------------------------------
{"message":"use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using rustup).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n"},"level":"error","spans":[{"file_name":"/<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs","byte_start":55,"byte_end":58,"line_start":5,"line_end":5,"column_start":9,"column_end":12,"is_primary":true,"text":[{"text":"        asm!(\"\");","highlight_start":9,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(asm)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change\n  --> /<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs:5:9\n   |\nLL |         asm!(\"\");\n   |         ^^^\n   |\n   = note: see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information\n   = help: add `#![feature(asm)]` to the crate attributes to enable\n\n"}
{"message":"use of unstable library feature 'llvm_asm': prefer using the new asm! syntax instead","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using rustup).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n"},"level":"error","spans":[{"file_name":"/<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs","byte_start":129,"byte_end":137,"line_start":7,"line_end":7,"column_start":9,"column_end":17,"is_primary":true,"text":[{"text":"        llvm_asm!(\"\");","highlight_start":9,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(llvm_asm)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'llvm_asm': prefer using the new asm! syntax instead\n  --> /<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs:7:9\n   |\nLL |         llvm_asm!(\"\");\n   |         ^^^^^^^^\n   |\n   = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information\n   = help: add `#![feature(llvm_asm)]` to the crate attributes to enable\n\n"}
{"message":"asm! is unsupported on this target","code":{"code":"E0472","explanation":null},"level":"error","spans":[{"file_name":"/<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs","byte_start":55,"byte_end":64,"line_start":5,"line_end":5,"column_start":9,"column_end":18,"is_primary":true,"text":[{"text":"        asm!(\"\");","highlight_start":9,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0472]: asm! is unsupported on this target\n  --> /<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs:5:9\n   |\nLL |         asm!(\"\");\n   |         ^^^^^^^^^\n\n"}
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/librustc_ast_lowering/expr.rs:1073:24
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: core::ops::function::Fn::call
   6: rustc_driver::report_ice
   7: <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::__static_ref_initialize::{{closure}}
   8: std::panicking::rust_panic_with_hook
   9: rust_begin_unwind
  10: core::panicking::panic_fmt
  11: core::panicking::panic
  12: rustc_ast_lowering::expr::<impl rustc_ast_lowering::LoweringContext>::lower_expr_asm
  13: rustc_data_structures::stack::ensure_sufficient_stack
  14: rustc_ast_lowering::LoweringContext::lower_stmt
  15: rustc_ast_lowering::LoweringContext::lower_block_noalloc
  16: rustc_data_structures::stack::ensure_sufficient_stack
  17: rustc_ast_lowering::LoweringContext::lower_block_noalloc
  18: rustc_ast_lowering::LoweringContext::lower_block_expr
  19: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_fn_body_block
  20: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_maybe_async_body
  21: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_item
  22: rustc_ast_lowering::LoweringContext::with_hir_id_owner
  23: <rustc_ast_lowering::item::ItemLowerer as rustc_ast::visit::Visitor>::visit_mod
  24: rustc_ast::visit::walk_crate
  25: rustc_ast_lowering::lower_crate
  26: rustc_interface::passes::BoxedResolver::access::{{closure}}
  27: rustc_interface::passes::configure_and_expand::{{closure}}
  28: rustc_interface::queries::Queries::lower_to_hir
  29: rustc_interface::queries::Queries::global_ctxt
  30: rustc_interface::interface::run_compiler_in_existing_thread_pool
  31: rustc_ast::attr::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.45.0 running on mips64el-unknown-linux-gnuabi64

note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 -C linker=mips64el-linux-gnuabi64-gcc

query stack during panic:
end of query stack
{"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
{"message":"For more information about this error, try `rustc --explain E0658`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0658`.\n"}

------------------------------------------

error: Error: expected failure status (Some(1)) but received status Some(101).
status: exit code: 101
command: "/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/stage2/bin/rustc" "/<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs" "-Zthreads=1" "--target=mips64el-unknown-linux-gnuabi64" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/test/ui/feature-gates/feature-gate-asm" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/native/rust-test-helpers" "-Clinker=mips64el-linux-gnuabi64-gcc" "-L" "/<<PKGBUILDDIR>>/build/mips64el-unknown-linux-gnuabi64/test/ui/feature-gates/feature-gate-asm/auxiliary"
stdout:
------------------------------------------

------------------------------------------
stderr:
------------------------------------------
error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
  --> /<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs:5:9
   |
LL |         asm!("");
   |         ^^^
   |
   = note: see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information
   = help: add `#![feature(asm)]` to the crate attributes to enable

error[E0658]: use of unstable library feature 'llvm_asm': prefer using the new asm! syntax instead
  --> /<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs:7:9
   |
LL |         llvm_asm!("");
   |         ^^^^^^^^
   |
   = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
   = help: add `#![feature(llvm_asm)]` to the crate attributes to enable

error[E0472]: asm! is unsupported on this target
  --> /<<PKGBUILDDIR>>/src/test/ui/feature-gates/feature-gate-asm.rs:5:9
   |
LL |         asm!("");
   |         ^^^^^^^^^

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/librustc_ast_lowering/expr.rs:1073:24
stack backtrace:
   0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
   1: core::fmt::write
   2: std::io::Write::write_fmt
   3: std::panicking::default_hook::{{closure}}
   4: std::panicking::default_hook
   5: core::ops::function::Fn::call
   6: rustc_driver::report_ice
   7: <rustc_driver::DEFAULT_HOOK as core::ops::deref::Deref>::deref::__static_ref_initialize::{{closure}}
   8: std::panicking::rust_panic_with_hook
   9: rust_begin_unwind
  10: core::panicking::panic_fmt
  11: core::panicking::panic
  12: rustc_ast_lowering::expr::<impl rustc_ast_lowering::LoweringContext>::lower_expr_asm
  13: rustc_data_structures::stack::ensure_sufficient_stack
  14: rustc_ast_lowering::LoweringContext::lower_stmt
  15: rustc_ast_lowering::LoweringContext::lower_block_noalloc
  16: rustc_data_structures::stack::ensure_sufficient_stack
  17: rustc_ast_lowering::LoweringContext::lower_block_noalloc
  18: rustc_ast_lowering::LoweringContext::lower_block_expr
  19: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_fn_body_block
  20: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_maybe_async_body
  21: rustc_ast_lowering::item::<impl rustc_ast_lowering::LoweringContext>::lower_item
  22: rustc_ast_lowering::LoweringContext::with_hir_id_owner
  23: <rustc_ast_lowering::item::ItemLowerer as rustc_ast::visit::Visitor>::visit_mod
  24: rustc_ast::visit::walk_crate
  25: rustc_ast_lowering::lower_crate
  26: rustc_interface::passes::BoxedResolver::access::{{closure}}
  27: rustc_interface::passes::configure_and_expand::{{closure}}
  28: rustc_interface::queries::Queries::lower_to_hir
  29: rustc_interface::queries::Queries::global_ctxt
  30: rustc_interface::interface::run_compiler_in_existing_thread_pool
  31: rustc_ast::attr::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.45.0 running on mips64el-unknown-linux-gnuabi64

note: compiler flags: -Z threads=1 -Z ui-testing -Z deduplicate-diagnostics=no -Z unstable-options -C prefer-dynamic -C rpath -C debuginfo=0 -C linker=mips64el-linux-gnuabi64-gcc

query stack during panic:
end of query stack
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0658`.

------------------------------------------
@jonas-schievink jonas-schievink added A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. F-asm `#![feature(asm)]` (not `llvm_asm`) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 6, 2020
@infinity0
Copy link
Contributor Author

the pretty asm test was fixed in #73308 but the other two problems still remain

@Amanieu
Copy link
Member

Amanieu commented Aug 6, 2020

Fixed by #75227.

@infinity0
Copy link
Contributor Author

@Amanieu thanks for the quick fix! Works over here on the Debian build machines.

Manishearth added a commit to Manishearth/rust that referenced this issue Aug 7, 2020
…crum

Fix ICE when using asm! on an unsupported architecture

Fixes rust-lang#75220
@bors bors closed this as completed in 9abdb6d Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. F-asm `#![feature(asm)]` (not `llvm_asm`) 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.

3 participants