Commit 3d2f5f7
committed
I've made some changes to help diagnose a segmentation fault that's been happening on ARM platforms. Here's what I did:
1. I enabled a `debug` feature in the project's configuration for the `gcmodule`. According to the library's documentation, this should add more checks that can turn undefined behavior or segfaults into panics with clearer messages.
2. I added some assertions in `src/collect.rs` to ensure that certain pointers (`GcHeader` pointers) are aligned correctly. These checks are in places where these pointers are used for storing extra information. If these pointers aren't aligned properly on ARM, it could corrupt the data and lead to segfaults. These new assertions will cause a panic if any misalignments are found, which should help us track down such problems.
The goal of these changes is to give us more detailed information when the code runs on an ARM environment, making it easier to find the cause of the segfault.1 parent b95d96b commit 3d2f5f7
2 files changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
286 | 293 | | |
287 | 294 | | |
288 | 295 | | |
| |||
426 | 433 | | |
427 | 434 | | |
428 | 435 | | |
429 | | - | |
| 436 | + | |
430 | 437 | | |
431 | | - | |
432 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
433 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
434 | 463 | | |
435 | 464 | | |
436 | 465 | | |
| |||
0 commit comments