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
It's possible that we have a contract that has a function taking in an address (u64 value).
contract;
abi Foo {
fn bar(addr: u64);
}
Then we have a script that calls this function bar as below:
script;
use Foo::bar;
fn something() {
let x : b256 = 0x1111....;
let x_addr = __addr_of(x);
bar(x_addr);
}
This (using the address of a local variable in another program) should be statically analysed and disallowed as it violates memory safety (and causes a runtime failure).
The text was updated successfully, but these errors were encountered:
It's possible that we have a contract that has a function taking in an address (
u64
value).Then we have a script that calls this function
bar
as below:This (using the address of a local variable in another program) should be statically analysed and disallowed as it violates memory safety (and causes a runtime failure).
The text was updated successfully, but these errors were encountered: