# wasm linking: handle unreachable call_indirect · gitcafe/zig

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

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

Visibility: public

Requested revision: 02119362d70bb16ae6ab00124928bde89834c83f

Requested commit: 02119362d70bb16ae6ab00124928bde89834c83f

Commit: 02119362d70bb16ae6ab00124928bde89834c83f

Tree: 8fc933f9cba5df08252b091bc40ef40ad310bfea

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
wasm linking: handle unreachable call_indirect

The compiler crashed when we tried to call a function pointer for which
the type signature does not match any function body or function import
in the entire wasm executable, because there is no way to create a
reference to a function without it being in the function table or import
table. Solution is to make this instruction lower to unreachable.

```

## Parents

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

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