mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-12 22:05:33 +00:00
Add workaround to prevent use after free issue resulting in bad pointer
This commit is contained in:
parent
8c2d4c5777
commit
bfa68e8d79
@ -199,6 +199,10 @@ pub struct Instance {
|
||||
// Region start memory location
|
||||
// code_base: *const (),
|
||||
pub emscripten_data: Option<EmscriptenData>,
|
||||
|
||||
// Workarounds to prevent use after free issue
|
||||
memories_pointer: Vec<BoundedSlice<u8>>,
|
||||
tables_pointer: Vec<BoundedSlice<usize>>,
|
||||
}
|
||||
|
||||
/// Contains pointers to data (heaps, globals, tables) needed
|
||||
@ -642,6 +646,8 @@ impl Instance {
|
||||
import_functions,
|
||||
start_func,
|
||||
emscripten_data: None,
|
||||
memories_pointer,
|
||||
tables_pointer,
|
||||
};
|
||||
|
||||
if options.abi == InstanceABI::Emscripten {
|
||||
|
Loading…
Reference in New Issue
Block a user