You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lucet-runtime/lucet-runtime-internals/src/module/dl.rs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,12 @@ impl DlModule {
61
61
let serialized_module:&SerializedModule =
62
62
unsafe{ serialized_module_ptr.as_ref().unwrap()};
63
63
64
+
let version = serialized_module.version.clone();
65
+
66
+
if !version.capabilities.present(){
67
+
returnErr(lucet_incorrect_module!("error loading module: capabilities are not present. This module is likely too old for this lucet-runtime to load."));
68
+
}
69
+
64
70
// Deserialize the slice into ModuleData, which will hold refs into the loaded
65
71
// shared object file in `module_data_slice`. Both of these get a 'static lifetime because
66
72
// Rust doesn't have a safe way to describe that their lifetime matches the containing
0 commit comments