Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ lazy_static! {
"__rust_alloc_zeroed".into(),
"__rust_dealloc".into(),
"__rust_realloc".into(),
"__rust_no_alloc_shim_is_unstable_v2".into(),
])
};
}
Expand Down
9 changes: 4 additions & 5 deletions kani-compiler/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
//! Module used to configure a compiler session.

use crate::args::Arguments;
use rustc_driver::default_translator;
use rustc_errors::{
ColorConfig, DiagInner, emitter::Emitter, emitter::HumanReadableErrorType,
fallback_fluent_bundle, json::JsonEmitter, registry::Registry as ErrorRegistry,
ColorConfig, DiagInner, emitter::Emitter, emitter::HumanReadableErrorType, json::JsonEmitter,
registry::Registry as ErrorRegistry,
};
use rustc_session::EarlyDiagCtxt;
use rustc_session::config::ErrorOutputType;
Expand Down Expand Up @@ -52,13 +53,11 @@ static JSON_PANIC_HOOK: LazyLock<Box<dyn Fn(&panic::PanicHookInfo<'_>) + Sync +
panic::set_hook(Box::new(|info| {
// Print stack trace.
let msg = format!("Kani unexpectedly panicked at {info}.",);
let fallback_bundle =
fallback_fluent_bundle(rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), false);
let mut emitter = JsonEmitter::new(
Box::new(io::BufWriter::new(io::stderr())),
#[allow(clippy::arc_with_non_send_sync)]
Some(Arc::new(SourceMap::new(FilePathMapping::empty()))),
fallback_bundle,
default_translator(),
false,
HumanReadableErrorType::Default,
ColorConfig::Never,
Expand Down
6 changes: 6 additions & 0 deletions library/kani/kani_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,9 @@ uint8_t *__rust_realloc(uint8_t *ptr, size_t old_size, size_t align, size_t new_

return result;
}

// Function required by the linker, see https://github.com/rust-lang/rust/pull/141061
struct Unit __rust_no_alloc_shim_is_unstable_v2(void)
{
return VoidUnit;
}
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT

[toolchain]
channel = "nightly-2025-06-18"
channel = "nightly-2025-06-27"
components = ["llvm-tools", "rustc-dev", "rust-src", "rustfmt"]
Loading