# CBE: memset\(\.\.\., 0xaa, \.\.\.\) undefined values · gitcafe/zig

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

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

Visibility: public

Requested revision: 29f531bec9fd8cedc0e0da0981d1a71bb3348641

Requested commit: 29f531bec9fd8cedc0e0da0981d1a71bb3348641

Commit: 29f531bec9fd8cedc0e0da0981d1a71bb3348641

Tree: 4206ee60cdc1be5a58d4fd38d3a70567e050a174

Author: Daniele Cocca

Committer: Andrew Kelley

## Message

```
CBE: memset(..., 0xaa, ...) undefined values

This commit makes airStore() handle undefined values directly instead of
delegating to renderValue(): the call to renderValue() happens too late,
when "dest = " has already been written to the stream, at which point
there's no sane way to initialize e.g. struct values by assignment.

Instead, we make airStore() use memset(dest, 0xaa, sizeof(dest)), which
should transparently handle all types.

Also moves the newly-passing tests to the top of test/behavior.zig.

```

## Parents

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

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