# Zcu: fix ZOIR cache bugs · gitcafe/zig

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

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

Visibility: public

Requested revision: 40891348923e48cbf371db5227acea7bb8b263aa

Requested commit: 40891348923e48cbf371db5227acea7bb8b263aa

Commit: 40891348923e48cbf371db5227acea7bb8b263aa

Tree: b5662b660284ad3f420cfea3c17fc77d9bd9599b

Author: Mason Remaley

Committer: Alex Rønne Petersen

## Message

```
Zcu: fix ZOIR cache bugs

* When saving bigint limbs, we gave the iovec the wrong length, meaning
  bigint data (and the following string and compile error data) was corrupted.
* When updating a stale ZOIR cache, we failed to truncate the file, so
  just wrote more bytes onto the end of the stale cache.

```

## Parents

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

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