Skip to content

v0.11.6 - Fix Memory safety issue

Compare
Choose a tag to compare
@mfelsche mfelsche released this 16 Sep 12:16
· 2744 commits to main since this release

0.11.6

Fixes

  • Fix possible memory safety issue when using patch or merge on state #1217.

Affected tremor-script code sample:

# this is where the memory safety issue occured
let state = merge state of event end;
emit state;

As an optimization we were optimizing both patch and merge to update the target expression (state in the case above) in-place, but only if the merge/patch result is assigned to itself. In case of state as target expression we were adding references to a given memory region where the event data was allocated and those references now outlived the actual event data allocation. 😱

This whole optimization has been removed for now.