This commit is contained in:
Ralf Jung 2022-05-29 14:06:35 +02:00
parent e45f2f0d5f
commit 7cd5fc3de3
9 changed files with 13 additions and 13 deletions

View File

@ -1 +1 @@
68314177e70017c08f6cdf295631bb508f9f85bc
0f06824013761ed6829887019033f1001e68f623

View File

@ -849,7 +849,7 @@ where
throw_ub_format!("incorrect number of arguments: got {}, expected {}", args.len(), N)
}
pub fn isolation_abort_error(name: &str) -> InterpResult<'static> {
pub fn isolation_abort_error<'tcx>(name: &str) -> InterpResult<'tcx> {
throw_machine_stop!(TerminationInfo::UnsupportedInIsolation(format!(
"{} not available when isolation is enabled",
name,

View File

@ -15,7 +15,7 @@ pub enum Dlsym {
impl Dlsym {
// Returns an error for unsupported symbols, and None if this symbol
// should become a NULL pointer (pretend it does not exist).
pub fn from_str(name: &[u8], target_os: &str) -> InterpResult<'static, Option<Dlsym>> {
pub fn from_str<'tcx>(name: &[u8], target_os: &str) -> InterpResult<'tcx, Option<Dlsym>> {
let name = &*String::from_utf8_lossy(name);
Ok(match target_os {
"linux" | "macos" => posix::Dlsym::from_str(name, target_os)?.map(Dlsym::Posix),

View File

@ -14,7 +14,7 @@ pub enum Dlsym {
impl Dlsym {
// Returns an error for unsupported symbols, and None if this symbol
// should become a NULL pointer (pretend it does not exist).
pub fn from_str(name: &str, target_os: &str) -> InterpResult<'static, Option<Dlsym>> {
pub fn from_str<'tcx>(name: &str, target_os: &str) -> InterpResult<'tcx, Option<Dlsym>> {
Ok(match target_os {
"linux" => linux::Dlsym::from_str(name)?.map(Dlsym::Linux),
"macos" => macos::Dlsym::from_str(name)?.map(Dlsym::MacOs),

View File

@ -8,7 +8,7 @@ pub enum Dlsym {}
impl Dlsym {
// Returns an error for unsupported symbols, and None if this symbol
// should become a NULL pointer (pretend it does not exist).
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option<Dlsym>> {
Ok(match &*name {
"__pthread_get_minstack" => None,
"getrandom" => None, // std falls back to syscall(SYS_getrandom, ...) when this is NULL.

View File

@ -14,7 +14,7 @@ pub enum Dlsym {
impl Dlsym {
// Returns an error for unsupported symbols, and None if this symbol
// should become a NULL pointer (pretend it does not exist).
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option<Dlsym>> {
Ok(match name {
"getentropy" => Some(Dlsym::getentropy),
_ => throw_unsup_format!("unsupported macOS dlsym: {}", name),

View File

@ -15,7 +15,7 @@ pub enum Dlsym {
impl Dlsym {
// Returns an error for unsupported symbols, and None if this symbol
// should become a NULL pointer (pretend it does not exist).
pub fn from_str(name: &str) -> InterpResult<'static, Option<Dlsym>> {
pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option<Dlsym>> {
Ok(match name {
"GetSystemTimePreciseAsFileTime" => None,
"NtWriteFile" => Some(Dlsym::NtWriteFile),

View File

@ -227,11 +227,11 @@ impl GlobalStateInner {
}
/// Error reporting
pub fn err_sb_ub(
pub fn err_sb_ub<'tcx>(
msg: String,
help: Option<String>,
history: Option<TagHistory>,
) -> InterpError<'static> {
) -> InterpError<'tcx> {
err_machine_stop!(TerminationInfo::ExperimentalUb {
msg,
help,

View File

@ -195,7 +195,7 @@ impl AllocHistory {
}
/// Report a descriptive error when `new` could not be granted from `derived_from`.
pub fn grant_error(
pub fn grant_error<'tcx>(
&self,
derived_from: SbTag,
new: Item,
@ -203,7 +203,7 @@ impl AllocHistory {
alloc_range: AllocRange,
error_offset: Size,
stack: &Stack,
) -> InterpError<'static> {
) -> InterpError<'tcx> {
let action = format!(
"trying to reborrow {:?} for {:?} permission at {}[{:#x}]",
derived_from,
@ -219,7 +219,7 @@ impl AllocHistory {
}
/// Report a descriptive error when `access` is not permitted based on `tag`.
pub fn access_error(
pub fn access_error<'tcx>(
&self,
access: AccessKind,
tag: SbTag,
@ -227,7 +227,7 @@ impl AllocHistory {
alloc_range: AllocRange,
error_offset: Size,
stack: &Stack,
) -> InterpError<'static> {
) -> InterpError<'tcx> {
let action = format!(
"attempting a {} using {:?} at {}[{:#x}]",
access,