Commit 2a953c1
Cygwin: Fix SEH and signal handling on AArch64
This patch adds the SEH_CODE macro (defined in exception.h), allowing
a single EXCEPTION_HANDLER_DATA metadata definition to be used on both
AArch64 and x86_64 architectures.
It also fixes an issue related to stack replacement in _dll_crt0 that
impacts SEH and signal handling, where due to an epilogue optimization
on AArch64 the epilogue might appear before _main_tls->call. However,
after the stack replacement this optimization becomes broken.
This patch prevents an epilogue from appearing before _main_tls->call
on AArch64 by inserting a compiler barrier after _main_tls->call.
Tests fixed on AArch64:
winsup.api/mmaptest03.exe
winsup.api/shmtest.exe (partially)
winsup.api/ltp/mmap05.exe
winsup.api/ltp/munmap01.exe
winsup.api/ltp/munmap02.exe
Signed-off-by: Evgeny Karpov <evgeny.karpov@arm.com>
Signed-off-by: Igor Podgainoi <igor.podgainoi@arm.com>1 parent 5f5462d commit 2a953c1
2 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1068 | 1074 | | |
1069 | 1075 | | |
1070 | 1076 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
25 | | - | |
26 | | - | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
0 commit comments