# tests: avoid loading 16 MiB onto the stack · gitcafe/zig

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

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

Visibility: public

Requested revision: 437059f37cc4e7fb0f1398043a88b2d7a9363653

Requested commit: 437059f37cc4e7fb0f1398043a88b2d7a9363653

Commit: 437059f37cc4e7fb0f1398043a88b2d7a9363653

Tree: 3e7c5f555469bb5f4420a8a04251efd639683402

Author: mlugg

Committer: Andrew Kelley

## Message

```
tests: avoid loading 16 MiB onto the stack

Currently, Zig semantically loads an array as a temporary when indexing
it. This means it cannot be guaranteed that only the requested element
is loaded; in particular, our self-hosted backends do not elide the load
of the full array, so this test case was crashing on self-hosted.

```

## Parents

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

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