Skip to content

Commit d06e8c9

Browse files
authored
Merge pull request #66626 from al45tair/eng/PR-110743884
[Backtracing][Linux] Properly align the stacks.
2 parents 545334c + dd7acb1 commit d06e8c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/public/runtime/Backtrace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ struct spawn_info {
796796
int memserver;
797797
};
798798

799-
uint8_t spawn_stack[4096];
799+
uint8_t spawn_stack[4096] __attribute__((aligned(SWIFT_PAGE_SIZE)));
800800

801801
int
802802
do_spawn(void *ptr) {

stdlib/public/runtime/CrashHandlerLinux.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ wait_paused(uint32_t expected, const struct timespec *timeout)
607607
We don't want to require CAP_SYS_PTRACE because we're potentially being
608608
used inside of a Docker container, which won't have that enabled. */
609609

610-
char memserver_stack[4096];
610+
char memserver_stack[4096] __attribute__((aligned(SWIFT_PAGE_SIZE)));
611611
char memserver_buffer[4096];
612612
int memserver_fd;
613613
bool memserver_has_ptrace;

0 commit comments

Comments
 (0)