[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <42d17306-1ac6-4fc7-ab1b-69ef045039ac@proton.me>
Date: Thu, 26 Sep 2024 21:40:20 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: kernel test robot <lkp@...el.com>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev, Greg KH <greg@...ah.com>, Simona Vetter <simona.vetter@...ll.ch>, linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v2 1/2] rust: add untrusted data abstraction
On 26.09.24 22:31, kernel test robot wrote:
> Hi Benno,
>
> kernel test robot noticed the following build errors:
>
> [auto build test ERROR on a2f11547052001bd448ccec81dd1e68409078fbb]
>
> url: https://github.com/intel-lab-lkp/linux/commits/Benno-Lossin/rust-add-untrusted-data-abstraction/20240926-045445
> base: a2f11547052001bd448ccec81dd1e68409078fbb
> patch link: https://lore.kernel.org/r/20240925205244.873020-2-benno.lossin%40proton.me
> patch subject: [PATCH v2 1/2] rust: add untrusted data abstraction
> config: x86_64-buildonly-randconfig-002-20240927 (https://download.01.org/0day-ci/archive/20240927/202409270303.kUIAmOmY-lkp@intel.com/config)
> compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240927/202409270303.kUIAmOmY-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@...el.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202409270303.kUIAmOmY-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>>> error[E0004]: non-exhaustive patterns: `Err(_)` not covered
> --> rust/kernel/validate.rs:188:15
> |
> 188 | match unsafe { value.__init(ptr) } {
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Err(_)` not covered
> |
> note: `core::result::Result<(), Infallible>` defined here
> --> /opt/cross/rustc-1.78.0-bindgen-0.65.1/rustup/toolchains/1.78.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:502:1
> |
> 502 | pub enum Result<T, E> {
> | ^^^^^^^^^^^^^^^^^^^^^
> ...
> 511 | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
> | --- not covered
> = note: the matched value is of type `core::result::Result<(), Infallible>`
> help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
> |
> 189 ~ Ok(()) => {},
> 190 + Err(_) => todo!()
I didn't include the `Err` variant here, since on nightly it would give
me this error:
error: unreachable pattern
--> rust/kernel/validate.rs:190:13
|
190 | Err(i) => match i {},
| ^^^^^^ matches no values because `Infallible` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
= note: `-D unreachable-patterns` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unreachable_patterns)]`
error: aborting due to 1 previous error
I can reproduce this error locally in a Rust project, but am unable to
do so on play.rust-lang.org. That seems very strange to me, anyone else
on 1.83 or 1.82 can confirm? AFAIK, it was stabilized in 1.82, see [1].
I would like to use `#[cfg("rust version <= 1.82")]`, but I don't know
how to do that. Do we already have support for checking the version in a
cfg? The alternative would be `#[allow(unreachable_patterns)]`, but I
would like to avoid that.
[1]: https://github.com/rust-lang/rust/issues/119612
---
Cheers,
Benno
> |
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists