mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-14 17:31:20 +00:00
Return compile error (llvm) for setting immutable global
This commit is contained in:
@ -1151,7 +1151,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
builder.build_store(ptr_to_value, value);
|
||||
}
|
||||
GlobalCache::Const { value: _ } => {
|
||||
unreachable!("cannot set non-mutable globals")
|
||||
return Err(CodegenError {
|
||||
message: "global is immutable".to_string(),
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user