Fix CI after CVE fixes (#5245)
* Fix CI after CVE fixes Alas we can't run CI ahead of time so this fixes various minor build issues from the merging of the recent CVE fixes. Note that I plan to publish the advisories once CI issues are sorted out. * Fix mmap/free of zero bytes
This commit is contained in:
@@ -422,6 +422,7 @@ impl MemoryImageSlot {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "pooling-allocator")]
|
||||
pub(crate) fn dummy() -> MemoryImageSlot {
|
||||
MemoryImageSlot {
|
||||
base: 0,
|
||||
@@ -760,6 +761,12 @@ impl MemoryImageSlot {
|
||||
/// Map anonymous zeroed memory across the whole slot,
|
||||
/// inaccessible. Used both during instantiate and during drop.
|
||||
fn reset_with_anon_memory(&mut self) -> Result<()> {
|
||||
if self.static_size == 0 {
|
||||
assert!(self.image.is_none());
|
||||
assert_eq!(self.accessible, 0);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
unsafe {
|
||||
cfg_if::cfg_if! {
|
||||
if #[cfg(unix)] {
|
||||
|
||||
Reference in New Issue
Block a user