vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@): vyperlang/vyper@b43fface148b45cbd2c90b5d24f77398a63745b5
Issue Description
In external_call.py the function _pack_arguments computes the length
of the buffer used to store both the arguments of the call and its
returned value as:
if fn_type.return_type is not None:
return_abi_t = calculate_type_for_external_return(fn_type.return_type).abi_type
# we use the same buffer for args and returndata,
# so allocate enough space here for the returndata too.
buflen = max(args_abi_t.size_bound(), return_abi_t.size_bound())
else:
buflen = args_abi_t.size_bound()
buflen += 32 # padding for the method id
In case the function returns a value and return_abi_t.size_bound() is
greater than or equal to args_abi_t.size_bound() + 32, the last 32
bytes of the buffer are never used.
Version Information
vyper --version
OR linkable commit hash vyperlang/vyper@Issue Description
In
external_call.py
the function_pack_arguments
computes the length of the buffer used to store both the arguments of the call and its returned value as:In case the function returns a value and
return_abi_t.size_bound()
is greater than or equal toargs_abi_t.size_bound() + 32
, the last 32 bytes of the buffer are never used.