Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libm/src/math/ceil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ mod tests {
(-1.0, -1.0, Status::OK),
(<$f>::INFINITY, <$f>::INFINITY, Status::OK),
(<$f>::NEG_INFINITY, <$f>::NEG_INFINITY, Status::OK),
(<$f>::NAN, <$f>::NAN, Status::OK),
(<$f>::NEG_NAN, <$f>::NEG_NAN, Status::OK),
// FIXME(snan): these should technically quiet the sNaN and return INVALID.
(<$f>::SNAN, <$f>::SNAN, Status::OK),
(<$f>::NEG_SNAN, <$f>::NEG_SNAN, Status::OK),
// with rounding
(0.1, 1.0, Status::INEXACT),
(-0.1, -0.0, Status::INEXACT),
Expand Down
5 changes: 5 additions & 0 deletions libm/src/math/floor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ mod tests {
(-1.0, -1.0, Status::OK),
(<$f>::INFINITY, <$f>::INFINITY, Status::OK),
(<$f>::NEG_INFINITY, <$f>::NEG_INFINITY, Status::OK),
(<$f>::NAN, <$f>::NAN, Status::OK),
(<$f>::NEG_NAN, <$f>::NEG_NAN, Status::OK),
// FIXME(snan): these should technically quiet the sNaN and return INVALID.
(<$f>::SNAN, <$f>::SNAN, Status::OK),
(<$f>::NEG_SNAN, <$f>::NEG_SNAN, Status::OK),
// with rounding
(0.1, 0.0, Status::INEXACT),
(-0.1, -1.0, Status::INEXACT),
Expand Down
6 changes: 6 additions & 0 deletions libm/src/math/rint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ mod tests {
(-1.0, -1.0, Status::OK),
(<$f>::INFINITY, <$f>::INFINITY, Status::OK),
(<$f>::NEG_INFINITY, <$f>::NEG_INFINITY, Status::OK),
// FIXME: these should return OK status
(<$f>::NAN, <$f>::NAN, Status::INEXACT),
(<$f>::NEG_NAN, <$f>::NEG_NAN, Status::INEXACT),
// FIXME(snan): these should technically quiet the sNaN and return INVALID.
(<$f>::SNAN, <$f>::SNAN, Status::INEXACT),
(<$f>::NEG_SNAN, <$f>::NEG_SNAN, Status::INEXACT),
// with rounding
(0.1, 0.0, Status::INEXACT),
(-0.1, -0.0, Status::INEXACT),
Expand Down
5 changes: 5 additions & 0 deletions libm/src/math/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ mod tests {
let val = f(x);
assert_biteq!(val, exp_res, "round({x:?}) {}", Hex(x));
}

assert!(f(F::NAN).is_qnan());
assert!(f(F::NEG_NAN).is_qnan());
assert!(f(F::SNAN).is_qnan());
assert!(f(F::NEG_SNAN).is_qnan());
}

#[test]
Expand Down
5 changes: 5 additions & 0 deletions libm/src/math/trunc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ mod tests {
(-1.0, -1.0, Status::OK),
(<$f>::INFINITY, <$f>::INFINITY, Status::OK),
(<$f>::NEG_INFINITY, <$f>::NEG_INFINITY, Status::OK),
(<$f>::NAN, <$f>::NAN, Status::OK),
(<$f>::NEG_NAN, <$f>::NEG_NAN, Status::OK),
// FIXME(snan): these should technically quiet the sNaN and return INVALID.
(<$f>::SNAN, <$f>::SNAN, Status::OK),
(<$f>::NEG_SNAN, <$f>::NEG_SNAN, Status::OK),
// with rounding
(0.1, 0.0, Status::INEXACT),
(-0.1, -0.0, Status::INEXACT),
Expand Down
41 changes: 41 additions & 0 deletions rustc-ice-2026-04-08T07_16_50-190622.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
thread 'rustc' panicked at /rustc-dev/bcded331651b60a0383b3ff51db4f24c4495ac53/compiler/rustc_middle/src/query/on_disk_cache.rs:663:9:
cannot decode `AttrId` with `CacheDecoder`
stack backtrace:
0: 0x77d8101b906b - <std[7d30a76dffadf049]::backtrace::Backtrace>::create
1: 0x77d8101b8fb5 - <std[7d30a76dffadf049]::backtrace::Backtrace>::force_capture
2: 0x77d80f1d3c8b - std[7d30a76dffadf049]::panicking::update_hook::<alloc[e0b931b7d0af5c50]::boxed::Box<rustc_driver_impl[5448826ccd3e97a1]::install_ice_hook::{closure#1}>>::{closure#0}
3: 0x77d8101cbb62 - std[7d30a76dffadf049]::panicking::panic_with_hook
4: 0x77d8101ae60a - std[7d30a76dffadf049]::panicking::panic_handler::{closure#0}
5: 0x77d8101a2b39 - std[7d30a76dffadf049]::sys::backtrace::__rust_end_short_backtrace::<std[7d30a76dffadf049]::panicking::panic_handler::{closure#0}, !>
6: 0x77d8101b003d - __rustc[a638a912b495cae0]::rust_begin_unwind
7: 0x77d80cca951c - core[623525b5c18656f3]::panicking::panic_fmt
8: 0x77d811d4b22d - <rustc_middle[6f95cc988acd69b2]::query::on_disk_cache::OnDiskCache>::load_side_effect
9: 0x77d811d4c78d - <rustc_query_impl[44740c00700bfba1]::dep_kind_vtables::non_query::SideEffect::{closure#0} as core[623525b5c18656f3]::ops::function::FnOnce<(rustc_middle[6f95cc988acd69b2]::ty::context::TyCtxt, rustc_middle[6f95cc988acd69b2]::dep_graph::dep_node::DepNode, rustc_middle[6f95cc988acd69b2]::dep_graph::serialized::SerializedDepNodeIndex)>>::call_once
10: 0x77d8108b8cb4 - <rustc_middle[6f95cc988acd69b2]::dep_graph::graph::DepGraphData>::try_mark_previous_green
11: 0x77d8108b5e69 - <rustc_middle[6f95cc988acd69b2]::dep_graph::graph::DepGraph>::try_mark_green
12: 0x77d8108b5cae - rustc_query_impl[44740c00700bfba1]::execution::ensure_can_skip_execution::<rustc_middle[6f95cc988acd69b2]::query::caches::DefaultCache<rustc_span[5cb0e44dc3869b0b]::def_id::LocalModDefId, rustc_middle[6f95cc988acd69b2]::query::erase::ErasedData<[u8; 0usize]>>>
13: 0x77d8118023b4 - rustc_query_impl[44740c00700bfba1]::query_impl::check_mod_deathness::execute_query_incr::__rust_end_short_backtrace
14: 0x77d811801e63 - rustc_interface[aed5607d16a7f406]::passes::analysis::{closure#0}::{closure#0}::{closure#1}
15: 0x77d811800962 - rustc_data_structures[94965839176f1595]::sync::parallel::par_fns
16: 0x77d8118008fc - rustc_interface[aed5607d16a7f406]::passes::analysis::{closure#0}::{closure#0}
17: 0x77d811800962 - rustc_data_structures[94965839176f1595]::sync::parallel::par_fns
18: 0x77d8108b9ca3 - rustc_interface[aed5607d16a7f406]::passes::analysis
19: 0x77d811dadabe - rustc_query_impl[44740c00700bfba1]::execution::try_execute_query::<rustc_middle[6f95cc988acd69b2]::query::caches::SingleCache<rustc_middle[6f95cc988acd69b2]::query::erase::ErasedData<[u8; 0usize]>>, true>
20: 0x77d811dad42a - rustc_query_impl[44740c00700bfba1]::query_impl::analysis::execute_query_incr::__rust_end_short_backtrace
21: 0x77d811a8309e - rustc_interface[aed5607d16a7f406]::interface::run_compiler::<(), rustc_driver_impl[5448826ccd3e97a1]::run_compiler::{closure#0}>::{closure#1}
22: 0x77d811a386fe - std[7d30a76dffadf049]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[aed5607d16a7f406]::util::run_in_thread_with_globals<rustc_interface[aed5607d16a7f406]::util::run_in_thread_pool_with_globals<rustc_interface[aed5607d16a7f406]::interface::run_compiler<(), rustc_driver_impl[5448826ccd3e97a1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
23: 0x77d811a38fa0 - <std[7d30a76dffadf049]::thread::lifecycle::spawn_unchecked<rustc_interface[aed5607d16a7f406]::util::run_in_thread_with_globals<rustc_interface[aed5607d16a7f406]::util::run_in_thread_pool_with_globals<rustc_interface[aed5607d16a7f406]::interface::run_compiler<(), rustc_driver_impl[5448826ccd3e97a1]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[623525b5c18656f3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
24: 0x77d811a39eac - <std[7d30a76dffadf049]::sys::thread::unix::Thread>::new::thread_start
25: 0x77d80b2a3d64 - start_thread
at ./nptl/pthread_create.c:448:8
26: 0x77d80b3373fc - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:78:0
27: 0x0 - <unknown>


rustc version: 1.96.0-nightly (bcded3316 2026-04-06)
platform: x86_64-unknown-linux-gnu

query stack during panic:
#0 [analysis] running analysis passes on crate `libm`
end of query stack
Loading