Commit 867e796
authored
lock allocstate before adding task event (#31)
We don't lock the alloc state before adding a task event. This can result in a
panic when we emit allocation metrics if it happens concurrently, because the
length of the slice isn't atomically updated with the contents so we end up
indexing an event that's been added before the slice is valid.1 parent 13916a7 commit 867e796
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
| 382 | + | |
381 | 383 | | |
382 | 384 | | |
383 | 385 | | |
| |||
0 commit comments