Commit b6cf382
Fix ThreadCachedArena zombies_ alignment mismatch
Summary:
Fixing the crash seen during shutdown: P2279276864
ThreadCachedArena stores maxAlign_ and passes it to per-thread arenas via allocateThreadLocalArena(), but the zombies_ arena was constructed with only minBlockSize — using the default maxAlign. When maxAlign_ != kDefaultMaxAlign, the two arenas have different blockGoodAllocSize() values, and Arena::merge asserts on thread exit during zombify().
Fix: pass maxAlign to the zombies_ arena constructor so it matches per-thread arenas.
This is a latent bug that surfaces whenever ThreadCachedArena is constructed with non-default alignment, e.g. from Unicorn's NodeArena.
Reviewed By: luciang
Differential Revision: D101491707
fbshipit-source-id: 90691bf83ec2f79e889bf8ac7ddbea482041fdc61 parent e7786cf commit b6cf382
2 files changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
154 | 183 | | |
155 | 184 | | |
156 | 185 | | |
| |||
0 commit comments