# Play guess who's to blame \(\#4078\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/391a61cdc2e8e2a4bb576cded1705875a70e7fad)

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

Visibility: public

Requested revision: 391a61cdc2e8e2a4bb576cded1705875a70e7fad

Requested commit: 391a61cdc2e8e2a4bb576cded1705875a70e7fad

Commit: 391a61cdc2e8e2a4bb576cded1705875a70e7fad

Tree: bb838758a3b88d17f60ef40e722f1f1984ee6ad3

Author: Conrad Irwin

Committer: GitHub

## Message

```
Play guess who's to blame (#4078)

We're occasionally seeing a crash in MetalRenderer::draw.

Looking at the backtrace, it seems almost certainly to be happening in
the call to `ptr::copy_nonoverlapping` on line 604 (see `#Don't Panic!`
channel notes)

As we already have added bounds checking to the destination, it seems
most
likely (however improbable) that somehow we're getting an invalid Ptr
and
length from the SmallVec.

To try and make progress on this, let's try a Vec for a bit lest there
is a subtle issue in SmallVec (though I couldn't spot one).


Release Notes:

- (maybe) Fixes SEGFAULT in MetalRenderer::draw
```

## Parents

- [4e8ad363f1cb419fa747483db5119b862cbe8593](https://git.cafe/gitcafe/zed/commit/4e8ad363f1cb419fa747483db5119b862cbe8593?format=markdown)

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

[Source at this commit](https://git.cafe/gitcafe/zed/tree/391a61cdc2e8e2a4bb576cded1705875a70e7fad?format=markdown)
