# stage2: introduce store_safe AIR instruction · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/5378fdffdcc60a5273021bc9cfc5be917e87c992)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 5378fdffdcc60a5273021bc9cfc5be917e87c992

Requested commit: 5378fdffdcc60a5273021bc9cfc5be917e87c992

Commit: 5378fdffdcc60a5273021bc9cfc5be917e87c992

Tree: ab4ceb8185b8a8fa3977b7fa76e1a49450f0aabb

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2: introduce store_safe AIR instruction

store:
The value to store may be undefined, in which case the destination
memory region has undefined bytes after this instruction is
evaluated. In such case ignoring this instruction is legal
lowering.

store_safe:
Same as `store`, except if the value to store is undefined, the
memory region should be filled with 0xaa bytes, and any other
safety metadata such as Valgrind integrations should be notified of
this memory region being undefined.

```

## Parents

- [d604553ee0c32caa0632a01e263a34e31a95b2b3](https://git.cafe/gitcafe/zig/commit/d604553ee0c32caa0632a01e263a34e31a95b2b3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/5378fdffdcc60a5273021bc9cfc5be917e87c992?format=markdown)
