8000 Update nightly ~~September~~ October 2022 by bradjc · Pull Request #3168 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update nightly ~~September~~ October 2022 #3168

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

Merged
merged 3 commits into from
Oct 12, 2022
Merged

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented Aug 26, 2022

Pull Request Overview

Placeholder PR to update the nightly after the release.

We're actually not on too old of a version, but September will be keeping with our approximate two month cadence.

Needed a patch to clippy first, which didn't land until October.

Testing Strategy

travis

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@github-actions github-actions bot added the stm32 Change pertains to the stm32 family of MCUSs label Aug 26, 2022
alistair23
alistair23 previously approved these changes Aug 29, 2022
@bradjc
Copy link
Contributor Author
bradjc commented Sep 7, 2022
  1. I tried to get a newer nightly, but it appears miri hasn't been available for a couple weeks:

  2. This nightly doesn't work because of:

    $ make
       Compiling esp32-c3-board v0.1.0 (/Users/bradjc/git/tock/boards/esp32-c3-devkitM-1)
    error: linking with `rust-lld` failed: exit status: 1
      |
      = note: "rust-lld" "-flavor" "gnu" "/var/folders/_4/n3tmwxks3318tsb36d913f600000gn/T/rustcTA0cjJ/symbols.o" "/Users/bradjc/git/tock/target/riscv32imc-unknown-none-elf/release/deps/esp32_c3_board-cc095587c204838f.esp32_c3_board.61e0b048-cgu.0.rcgu.o" "--as-needed" "-L" "/Users/bradjc/git/tock/target/riscv32imc-unknown-none-elf/release/deps" "-L" "/Users/bradjc/git/tock/target/release/deps" "-L" "/Users/bradjc/.rustup/toolchains/nightly-2022-08-26-x86_64-apple-darwin/lib/rustlib/riscv32imc-unknown-none-elf/lib" "-Bstatic" "/Users/bradjc/git/tock/target/riscv32imc-unknown-none-elf/release/deps/libcompiler_builtins-176bfe12cc139d74.rlib" "-Bdynamic" "-znoexecstack" "-L" "/Users/bradjc/.rustup/toolchains/nightly-2022-08-26-x86_64-apple-darwin/lib/rustlib/riscv32imc-unknown-none-elf/lib" "-o" "/Users/bradjc/git/tock/target/riscv32imc-unknown-none-elf/release/deps/esp32_c3_board-cc095587c204838f" "--gc-sections" "-L/Users/bradjc/git/tock/boards/esp32-c3-devkitM-1" "-Tlayout.ld" "-nmagic" "-icf=all"
      = note: rust-lld: warning: section type mismatch for .stack_buffer
              >>> /Users/bradjc/git/tock/target/riscv32imc-unknown-none-elf/release/deps/esp32_c3_board-cc095587c204838f.esp32_c3_board.61e0b048-cgu.0.rcgu.o:(.stack_buffer): SHT_PROGBITS
              >>> output section .stack: SHT_NOBITS
    
              rust-lld: error: /Users/bradjc/git/tock/target/riscv32imc-unknown-none-elf/release/deps/esp32_c3_board-cc095587c204838f.esp32_c3_board.61e0b048-cgu.0.rcgu.o:(.rodata.cst16): offset is outside the section
    
    
    error: could not compile `esp32-c3-board` due to previous error
    

    I tried playing around with sizes and linker constants and nothing changed the error. I can't explain why it only seems to affect this board. I didn't see anything unusual about the linker setup for this board.

@bradjc
Copy link
Contributor Author
bradjc commented Sep 8, 2022

I tried a newer nightly and this issue went away. So I guess we just wait for miri.

@bradjc
Copy link
Contributor Author
bradjc commented Sep 12, 2022

Now the issue is clippy. I tried on today's nightly and get:

    Checking nrf52_components v0.1.0 (/Users/bradjc/git/tock/boards/nordic/nrf52_components)
thread 'rustc' panicked at 'normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner { kind: using uninitialized data, but this operation requires initialized memory, backtrace: None })', compiler/rustc_const_eval/src/const_eval/eval_queries.rs:138:36
note: run with `RUST_BACKTRACE=1` environment variable to display a 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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (59e7a308 2022-09-11)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring mir constant
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `qemu_rv32_virt`
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner { kind: using uninitialized data, but this operation requires initialized memory, backtrace: None })', compiler/rustc_const_eval/src/const_eval/eval_queries.rs:138:36
note: run with `RUST_BACKTRACE=1` environment variable to display a 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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (59e7a308 2022-09-11)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring mir constant
#1 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner { kind: using uninitialized data, but this operation requires initialized memory, backtrace: None })', compiler/rustc_const_eval/src/const_eval/eval_queries.rs:138:36
note: run with `RUST_BACKTRACE=1` environment variable to display a 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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (59e7a308 2022-09-11)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring mir constant
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `redboard_redv`
error: could not compile `hifive1`
thread 'rustc' panicked at 'normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner { kind: using uninitialized data, but this operation requires initialized memory, backtrace: None })', compiler/rustc_const_eval/src/const_eval/eval_queries.rs:138:36
note: run with `RUST_BACKTRACE=1` environment variable to display a 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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (59e7a308 2022-09-11)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring mir constant
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `hail`
thread 'rustc' panicked at 'normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner { kind: using uninitialized data, but this operation requires initialized memory, backtrace: None })', compiler/rustc_const_eval/src/const_eval/eval_queries.rs:138:36
note: run with `RUST_BACKTRACE=1` environment variable to display a 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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (59e7a308 2022-09-11)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring mir constant
#1 [analysis] running analysis passes on this crate
end of query stack
thread 'rustc' panicked at 'normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner { kind: using uninitialized data, but this operation requires initialized memory, backtrace: None })', compiler/rustc_const_eval/src/const_eval/eval_queries.rs:138:36
note: run with `RUST_BACKTRACE=1` environment variable to display a 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-clippy/issues/new

note: Clippy version: clippy 0.1.65 (59e7a308 2022-09-11)

query stack during panic:
#0 [try_destructure_mir_constant] destructuring mir constant
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `msp-exp432p401r`
error: could not compile `stm32f412`

@hudson-ayers
Copy link
Contributor

The root of the ICE is the constant we create on this line:

const UNINIT: MaybeUninit<RoundRobinProcessNode<'static>> = MaybeUninit::uninit();
. I posted an MCVE to the clippy and rust repositories so hopefully a compiler dev will be able to quickly fix this bug, but if not we could probably get around it by making this initialization macro more complex (read: recursive) instead of using the use a "constant to get around the array initialization shortcomings" trick.

@bradjc
Copy link
Contributor Author
bradjc commented Sep 12, 2022

we could probably get around it by making this initialization macro more complex (read: recursive) instead of using the use a "constant to get around the array initialization shortcomings" trick.

Luckily we are in no hurry, our last update was in July so we are right on schedule. But, this is exactly why we update the nightly every two months.

@bradjc
Copy link
Contributor Author
bradjc commented Sep 23, 2022

I'm a little concerned about our ability to update rust at this point.

@bradjc bradjc added the blocked-upstream Waiting on something from an upstream project label Sep 23, 2022
@bradjc bradjc force-pushed the update-nightly-sep-2022 branch from 2a2c412 to 2e4e5e5 Compare September 28, 2022 17:55
@bradjc
Copy link
Contributor Author
bradjc commented Sep 28, 2022

I tried the latest nightly, but it doesn't seem the fix is included yet.

@github-actions github-actions bot added the WG-OpenTitan In the purview of the OpenTitan working group. label Sep 28, 2022
@bradjc
Copy link
Contributor Author
bradjc commented Oct 4, 2022

I think we are waiting on clippy changes to be upstreamed, which will hopefully happen in the next week.

@bradjc
Copy link
Contributor Author
bradjc commented Oct 4, 2022

@bradjc bradjc force-pushed the update-nightly-sep-2022 branch from 2e4e5e5 to a821b7a Compare October 7, 2022 13:43
@bradjc bradjc force-pushed the update-nightly-sep-2022 branch from a821b7a to f11036d Compare October 9, 2022 02:28
@bradjc bradjc removed the blocked-upstream Waiting on something from an upstream project label Oct 9, 2022
@bradjc bradjc changed the title Update nightly September 2022 Update nightly ~~September~~ October 2022 Oct 9, 2022
@bradjc
Copy link
Contributor Author
bradjc commented Oct 9, 2022

Ok this should finally be ready!

@hudson-ayers
Copy link
Contributor

bors r+

@bors
Copy link
Contributor
bors bot commented Oct 12, 2022

@bors bors bot merged commit 64f39db into master Oct 12, 2022
@bors bors bot deleted the update-nightly-sep-2022 branch October 12, 2022 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stm32 Change pertains to the stm32 family of MCUSs WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0