A child call leaves a result buffer separate from its success flag.
LET’S PICTURE IT
A completed request has both an outcome indicator and an attached response envelope.
SEE IT FOR YOURSELF
Use temporary memory in one execution frameStep 1 / 4
This frame uses temporary byte-addressed memory. Solidity normally keeps a free memory pointer at address 0x40, initially pointing to 0x80.
This frame uses temporary byte-addressed memory. Solidity normally keeps a free memory pointer at address 0x40, initially pointing to 0x80.In this simplified example, MSTORE writes integer forty-two into thirty-two bytes beginning at memory byte 0x80. Accessing this range may expand active memory.MLOAD at byte 0x80 reads that complete thirty-two-byte word back as a stack value. It does not fetch persistent storage or network data.RETURN can expose a chosen memory range as output. Frame memory is temporary; returning data does not turn it into persistent contract state.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Check the call outcome
A low-level call exposes whether the child succeeded and can provide returned bytes. The byte sequence alone is not a reliable substitute for checking success.
Inspect the return-data size
RETURNDATASIZE reports the size of the current return-data buffer. It does not guarantee that the bytes match the expected output schema.
Copy only a valid range
RETURNDATACOPY requires the requested source range to fit the buffer. Unlike calldata loading, an out-of-range return-data copy does not simply create padded success data.
Bound resource use
Copying attacker-influenced output can consume memory and gas. An application should decide how much output it actually needs and handle unusually large results.
Trace the idea
CALL → success flag + return-data buffer
RETURNDATASIZE → byte count
RETURNDATACOPY → validated range into memory
Stack examples list the bottom first and the top last. These small traces omit gas and surrounding dispatch unless stated.
QUICK CHECK · NO PRESSURE
Is a failed call’s payload always successful function output?
It may contain revert bytes or another unexpected shape.