Commit c209892
cmd/cgo: correct padding required by alignment
If the aligned offset isn't sufficient for the field offset,
we were padding based on the aligned offset. We need to pad
based on the original offset instead.
Also set the Go alignment correctly for int128. We were defaulting
to the maximum alignment, but since we translate int128 into an
array of uint8 the correct Go alignment is 1.
Fixes #69086
Change-Id: I23ce583335c81beac2ac51f7f9336ac97ccebf09
Reviewed-on: https://go-review.googlesource.com/c/go/+/608815
Reviewed-by: Damien Neil <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>1 parent 6781ff2 commit c209892
3 files changed
Lines changed: 51 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2577 | 2577 | | |
2578 | 2578 | | |
2579 | 2579 | | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
2580 | 2585 | | |
2581 | 2586 | | |
2582 | 2587 | | |
| |||
2593 | 2598 | | |
2594 | 2599 | | |
2595 | 2600 | | |
2596 | | - | |
2597 | | - | |
2598 | | - | |
| 2601 | + | |
| 2602 | + | |
2599 | 2603 | | |
2600 | 2604 | | |
2601 | 2605 | | |
| |||
2824 | 2828 | | |
2825 | 2829 | | |
2826 | 2830 | | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
2827 | 2836 | | |
2828 | 2837 | | |
2829 | 2838 | | |
| |||
2840 | 2849 | | |
2841 | 2850 | | |
2842 | 2851 | | |
2843 | | - | |
2844 | | - | |
2845 | | - | |
| 2852 | + | |
| 2853 | + | |
2846 | 2854 | | |
2847 | 2855 | | |
2848 | 2856 | | |
| |||
3108 | 3116 | | |
3109 | 3117 | | |
3110 | 3118 | | |
| 3119 | + | |
3111 | 3120 | | |
3112 | 3121 | | |
3113 | 3122 | | |
3114 | | - | |
| 3123 | + | |
3115 | 3124 | | |
3116 | 3125 | | |
3117 | 3126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
943 | 956 | | |
944 | 957 | | |
945 | 958 | | |
| |||
2349 | 2362 | | |
2350 | 2363 | | |
2351 | 2364 | | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
| 2368 | + | |
| 2369 | + | |
| 2370 | + | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
| 2381 | + | |
| 2382 | + | |
| 2383 | + | |
| 2384 | + | |
| 2385 | + | |
0 commit comments