Commit 98ea512
authored
[clang][bytecode] Clear inactive union fields when copying (#134982)
When copying unions, we need to only copy the active field of the source
union, which we were already doing. However, we also need to zero out
the (now) inactive fields, so we don't end up with dangling pointers in
those inactive fields.1 parent 2828328 commit 98ea512
File tree
2 files changed
+570
-1
lines changed- clang
- lib/AST/ByteCode
- test/AST/ByteCode/libcxx
2 files changed
+570
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2723 | 2723 | | |
2724 | 2724 | | |
2725 | 2725 | | |
| 2726 | + | |
| 2727 | + | |
| 2728 | + | |
| 2729 | + | |
| 2730 | + | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
| 2744 | + | |
| 2745 | + | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
| 2755 | + | |
| 2756 | + | |
| 2757 | + | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
2726 | 2765 | | |
2727 | 2766 | | |
2728 | 2767 | | |
| |||
2751 | 2790 | | |
2752 | 2791 | | |
2753 | 2792 | | |
2754 | | - | |
| 2793 | + | |
2755 | 2794 | | |
2756 | 2795 | | |
2757 | 2796 | | |
2758 | 2797 | | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
2759 | 2801 | | |
2760 | 2802 | | |
2761 | 2803 | | |
| |||
0 commit comments