Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

/issue5736_common package

Overview

Package issue5736_common is a regression fixture for https://github.com/gnolang/gno/issues/5736.

It mimics the gnoswap pattern that surfaced the bug: a non-crossing helper in an /r/ realm that performs in-place uint256 arithmetic on a value handed in from another /r/ realm. Before the fix to {Array,Struct}Value.Copy, this triggered:

Example
1panic: cannot directly modify readonly tainted object
2  gno.land/p/onbloc/uint256/bitwise.gno (z.arr[0] = z.arr[0] << n)

Function

DoLsh

func DoLsh(x *u256.Uint, n uint) *u256.Uint

Params

Command

gnokey query vm/qeval -remote "https://api.gno.berty.io:443" -data "gno.land/r/tests/issue5736_common.DoLsh(,)"

Result