Commit ba5318e
authored
Acquire the global lock before initializing malloc (#410)
In a multi-threaded execution we need to make sure that only exactly one
thread initializes malloc. The function try_init_allocator() can't
easily be made thread-safe, so just move the call to
try_init_allocator() inside the block that holds the lock.1 parent d8abbaa commit ba5318e
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4593 | 4593 | | |
4594 | 4594 | | |
4595 | 4595 | | |
| 4596 | + | |
4596 | 4597 | | |
4597 | 4598 | | |
4598 | | - | |
4599 | | - | |
4600 | | - | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
4601 | 4602 | | |
4602 | 4603 | | |
4603 | | - | |
4604 | 4604 | | |
4605 | 4605 | | |
4606 | 4606 | | |
| |||
0 commit comments