mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Fix BSD regressions
The recent change to crt.S that aggressively aligns the system-provided
stack has been rolled back on non-Linux until we can find a better way,
since it can cause a segfault early in execution on several platforms.
This change fixes a regression in tcgetattr() and tcsetattr() on OpenBSD
and NetBSD caused by 4778cd4d27
.
This change has been tested across the runitd test fleet which is green.
This commit is contained in:
parent
5a77db2cd5
commit
053681cb97
9 changed files with 34 additions and 37 deletions
|
@ -72,9 +72,9 @@ _start:
|
|||
// setup a stack frame
|
||||
// align stack to GetStackSize() so GetStackAddr() is fast
|
||||
.weak ape_stack_memsz
|
||||
mov $ape_stack_memsz,%r8d
|
||||
mov $ape_stack_align,%r9d
|
||||
cmp $_HOSTMETAL,%cl
|
||||
mov $ape_stack_memsz,%r9d
|
||||
mov $ape_stack_align,%r8d
|
||||
cmp $_HOSTLINUX,%cl
|
||||
cmove %r9d,%r8d
|
||||
neg %r8
|
||||
and %r8,%rsp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue