Commit c808020
committed
[LLD][COFF] Don't resolve weak aliases when performing local import
Fixes crashes reported in #151255.
The alias may have already been stored for later resolution, which can lead
to treating a resolved alias as if it were still undefined. Instead, use the
alias target directly for the import.
Also extended the test to make reproducing the problem more likely, and added
an assert that catches the issue.1 parent 8f77fa7 commit c808020
File tree
3 files changed
+18
-16
lines changed- lld
- COFF
- test/COFF
3 files changed
+18
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2714 | 2714 | | |
2715 | 2715 | | |
2716 | 2716 | | |
2717 | | - | |
| 2717 | + | |
| 2718 | + | |
2718 | 2719 | | |
| 2720 | + | |
2719 | 2721 | | |
2720 | 2722 | | |
2721 | 2723 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
| 481 | + | |
488 | 482 | | |
489 | 483 | | |
490 | 484 | | |
491 | | - | |
| 485 | + | |
492 | 486 | | |
493 | 487 | | |
494 | 488 | | |
| |||
502 | 496 | | |
503 | 497 | | |
504 | 498 | | |
505 | | - | |
506 | | - | |
507 | | - | |
| 499 | + | |
| 500 | + | |
508 | 501 | | |
509 | | - | |
| 502 | + | |
510 | 503 | | |
511 | 504 | | |
512 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
19 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
0 commit comments