Merge pull request from GHSA-hpqh-2wqx-7qp5
Fix spillslot reload of narrow values: zero-extend, don't sign-extend. Release v0.74.0 as security-patch release.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
authors = ["The Cranelift Project Developers"]
|
||||
name = "cranelift-codegen"
|
||||
version = "0.73.0"
|
||||
version = "0.74.0"
|
||||
description = "Low-level code generator library"
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
documentation = "https://docs.rs/cranelift-codegen"
|
||||
@@ -13,9 +13,9 @@ build = "build.rs"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen-shared = { path = "./shared", version = "0.73.0" }
|
||||
cranelift-entity = { path = "../entity", version = "0.73.0" }
|
||||
cranelift-bforest = { path = "../bforest", version = "0.73.0" }
|
||||
cranelift-codegen-shared = { path = "./shared", version = "0.74.0" }
|
||||
cranelift-entity = { path = "../entity", version = "0.74.0" }
|
||||
cranelift-bforest = { path = "../bforest", version = "0.74.0" }
|
||||
hashbrown = { version = "0.9.1", optional = true }
|
||||
target-lexicon = "0.12"
|
||||
log = { version = "0.4.6", default-features = false }
|
||||
@@ -23,9 +23,9 @@ serde = { version = "1.0.94", features = ["derive"], optional = true }
|
||||
bincode = { version = "1.2.1", optional = true }
|
||||
gimli = { version = "0.24.0", default-features = false, features = ["write"], optional = true }
|
||||
smallvec = { version = "1.6.1" }
|
||||
peepmatic = { path = "../peepmatic", optional = true, version = "0.73.0" }
|
||||
peepmatic-traits = { path = "../peepmatic/crates/traits", optional = true, version = "0.73.0" }
|
||||
peepmatic-runtime = { path = "../peepmatic/crates/runtime", optional = true, version = "0.73.0" }
|
||||
peepmatic = { path = "../peepmatic", optional = true, version = "0.74.0" }
|
||||
peepmatic-traits = { path = "../peepmatic/crates/traits", optional = true, version = "0.74.0" }
|
||||
peepmatic-runtime = { path = "../peepmatic/crates/runtime", optional = true, version = "0.74.0" }
|
||||
regalloc = { version = "0.0.31" }
|
||||
souper-ir = { version = "2.1.0", optional = true }
|
||||
wast = { version = "35.0.0", optional = true }
|
||||
@@ -38,7 +38,7 @@ wast = { version = "35.0.0", optional = true }
|
||||
criterion = "0.3"
|
||||
|
||||
[build-dependencies]
|
||||
cranelift-codegen-meta = { path = "meta", version = "0.73.0" }
|
||||
cranelift-codegen-meta = { path = "meta", version = "0.74.0" }
|
||||
|
||||
[features]
|
||||
default = ["std", "unwind"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "cranelift-codegen-meta"
|
||||
authors = ["The Cranelift Project Developers"]
|
||||
version = "0.73.0"
|
||||
version = "0.74.0"
|
||||
description = "Metaprogram for cranelift-codegen code generator library"
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
repository = "https://github.com/bytecodealliance/wasmtime"
|
||||
@@ -13,8 +13,8 @@ edition = "2018"
|
||||
# rustdoc-args = [ "--document-private-items" ]
|
||||
|
||||
[dependencies]
|
||||
cranelift-codegen-shared = { path = "../shared", version = "0.73.0" }
|
||||
cranelift-entity = { path = "../../entity", version = "0.73.0" }
|
||||
cranelift-codegen-shared = { path = "../shared", version = "0.74.0" }
|
||||
cranelift-entity = { path = "../../entity", version = "0.74.0" }
|
||||
|
||||
[badges]
|
||||
maintenance = { status = "experimental" }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
authors = ["The Cranelift Project Developers"]
|
||||
name = "cranelift-codegen-shared"
|
||||
version = "0.73.0"
|
||||
version = "0.74.0"
|
||||
description = "For code shared between cranelift-codegen-meta and cranelift-codegen"
|
||||
license = "Apache-2.0 WITH LLVM-exception"
|
||||
repository = "https://github.com/bytecodealliance/wasmtime"
|
||||
|
||||
@@ -317,19 +317,19 @@ impl ABIMachineSpec for X64ABIMachineSpec {
|
||||
}
|
||||
|
||||
fn gen_load_stack(mem: StackAMode, into_reg: Writable<Reg>, ty: Type) -> Self::I {
|
||||
let ext_kind = match ty {
|
||||
// For integer-typed values, we always load a full 64 bits (and we always spill a full 64
|
||||
// bits as well -- see `Inst::store()`).
|
||||
let ty = match ty {
|
||||
types::B1
|
||||
| types::B8
|
||||
| types::I8
|
||||
| types::B16
|
||||
| types::I16
|
||||
| types::B32
|
||||
| types::I32 => ExtKind::SignExtend,
|
||||
types::B64 | types::I64 | types::R64 | types::F32 | types::F64 => ExtKind::None,
|
||||
_ if ty.bytes() == 16 => ExtKind::None,
|
||||
_ => panic!("load_stack({})", ty),
|
||||
| types::I32 => types::I64,
|
||||
_ => ty,
|
||||
};
|
||||
Inst::load(ty, mem, into_reg, ext_kind)
|
||||
Inst::load(ty, mem, into_reg, ExtKind::None)
|
||||
}
|
||||
|
||||
fn gen_store_stack(mem: StackAMode, from_reg: Reg, ty: Type) -> Self::I {
|
||||
|
||||
@@ -1038,6 +1038,7 @@ impl fmt::Display for Avx512Opcode {
|
||||
/// This defines the ways a value can be extended: either signed- or zero-extension, or none for
|
||||
/// types that are not extended. Contrast with [ExtMode], which defines the widths from and to which
|
||||
/// values can be extended.
|
||||
#[allow(dead_code)]
|
||||
#[derive(Clone, PartialEq)]
|
||||
pub enum ExtKind {
|
||||
None,
|
||||
|
||||
Reference in New Issue
Block a user