diff options
author | David Benjamin <davidben@google.com> | 2024-05-12 10:34:17 -0400 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-05-15 23:22:12 +0000 |
commit | 07f27b1d445a27433f2c871935da2cefcfbdb458 (patch) | |
tree | 7c9adebc003032d7d5f84a64612754e81f758484 /gen/test_support | |
parent | fc953df2352e1c1bcb34cb5f75a0e409014c1690 (diff) | |
download | boringssl-07f27b1d445a27433f2c871935da2cefcfbdb458.zip boringssl-07f27b1d445a27433f2c871935da2cefcfbdb458.tar.gz boringssl-07f27b1d445a27433f2c871935da2cefcfbdb458.tar.bz2 |
Fix alignment of generated UNWIND_INFO structures
I missed a few parts of the Windows documentation:
> The UNWIND_INFO structure must be DWORD aligned in memory.
> For alignment purposes, this array [unwind codes] always has an even
> number of entries, and the final entry is potentially unused. In that
> case, the array is one longer than indicated by the count of unwind
> codes field.
https://learn.microsoft.com/en-us/cpp/build/exception-handling-x64?view=msvc-170
This didn't seem to have any practical effect (unwinding tests worked
as-is), but I noticed this while rewriting some handwritten codes.
Bug: 259
Change-Id: I655f3a7f3a907797e7665a276f4926a31a1e1639
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/68407
Reviewed-by: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Adam Langley <agl@google.com>
Diffstat (limited to 'gen/test_support')
-rw-r--r-- | gen/test_support/trampoline-x86_64-win.asm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gen/test_support/trampoline-x86_64-win.asm b/gen/test_support/trampoline-x86_64-win.asm index dca3957..7c7d3c3 100644 --- a/gen/test_support/trampoline-x86_64-win.asm +++ b/gen/test_support/trampoline-x86_64-win.asm @@ -698,6 +698,7 @@ $L$SEH_info_abi_test_bad_unwind_wrong_register_0: DB $L$SEH_prologue_abi_test_bad_unwind_wrong_register_2-$L$SEH_begin_abi_test_bad_unwind_wrong_register_1 DB 208 + DW 0 $L$SEH_info_abi_test_bad_unwind_temporary_0: DB 1 DB $L$SEH_endprologue_abi_test_bad_unwind_temporary_3-$L$SEH_begin_abi_test_bad_unwind_temporary_1 @@ -706,6 +707,7 @@ $L$SEH_info_abi_test_bad_unwind_temporary_0: DB $L$SEH_prologue_abi_test_bad_unwind_temporary_2-$L$SEH_begin_abi_test_bad_unwind_temporary_1 DB 192 + DW 0 $L$SEH_info_abi_test_bad_unwind_epilog_0: DB 1 DB $L$SEH_endprologue_abi_test_bad_unwind_epilog_3-$L$SEH_begin_abi_test_bad_unwind_epilog_1 @@ -713,6 +715,8 @@ $L$SEH_info_abi_test_bad_unwind_epilog_0: DB 0 DB $L$SEH_prologue_abi_test_bad_unwind_epilog_2-$L$SEH_begin_abi_test_bad_unwind_epilog_1 DB 192 + + DW 0 %else ; Work around https://bugzilla.nasm.us/show_bug.cgi?id=3392738 ret |