Skip to main content

get_return_data

Function get_return_data 

Source
pub fn get_return_data() -> Option<ReturnData>
Expand description

Read return data from the most recent CPI.

The 1 KiB snapshot buffer is not zero-filled before the syscall, the syscall initializes exactly the reported prefix, and None is returned before any read when the runtime reports zero bytes. This is the bug class behind Quasar #238/#234 (an assume_init over a buffer the syscall never wrote, exposing uninitialized stack bytes as return data); Hopper’s shape is immune because uninitialized bytes can never escape: empty return data short-circuits to None, and every accessor reads only the syscall-initialized data_len prefix.