mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-07-15 06:51:49 +00:00
MemoryManager: workaround release build problem
Running test_obj_alloc and similar (e.g. install+start+stop+uninstall) on a release build yields kernel complaints about using a null capability. Traced this down to delete_caps for ObjDesc's with count > 1. Checking the result from the syscall resolves things. Seems like an optimizer bug. Change-Id: Ib09095ac4255261b1ef67fec68ef3267d6be4883 GitOrigin-RevId: 7149d33b88d2b383d4ab65903c62c478e1659d1d
This commit is contained in:
parent
0286d516ce
commit
ea5b34e20b
@ -8,7 +8,7 @@ use kata_memory_interface::MemoryError;
|
||||
use kata_memory_interface::MemoryManagerInterface;
|
||||
use kata_memory_interface::MemoryManagerStats;
|
||||
use kata_os_common::sel4_sys;
|
||||
use log::{debug, error, trace};
|
||||
use log::{debug, error, warn, trace};
|
||||
use sel4_sys::seL4_CPtr;
|
||||
use sel4_sys::seL4_CNode_Delete;
|
||||
use sel4_sys::seL4_Error;
|
||||
@ -174,8 +174,10 @@ impl MemoryManager {
|
||||
|
||||
fn delete_caps(root: seL4_CPtr, depth: u8, od: &ObjDesc) -> seL4_Result {
|
||||
for offset in 0..od.retype_count() {
|
||||
// TODO(sleffler) warn about errors?
|
||||
unsafe { seL4_CNode_Delete(root, od.cptr + offset, depth) }?;
|
||||
let path = (root, od.cptr + offset, depth);
|
||||
if let Err(e) = unsafe { seL4_CNode_Delete(path.0, path.1, path.2) } {
|
||||
warn!("DELETE {:?} failed: od {:?} error {:?}", &path, od, e);
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user