Skip to content

Commit

Permalink
Make sure the i386 sysv stack is aligned
Browse files Browse the repository at this point in the history
The previous fix had a typo in which the wrong offset was used which
meant that the alignment still wasn't correct. Fix this properly now.
  • Loading branch information
nielsdos committed Jan 27, 2023
1 parent e286649 commit 0eb4263
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/asm/make_i386_sysv_elf_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ make_fcontext:
andl $-16, %eax

/* reserve space for context-data on context-stack, and align the stack */
leal -0x30(%eax), %eax
leal -0x34(%eax), %eax

/* third arg of make_fcontext() == address of context-function */
/* stored in EBX */
Expand Down
2 changes: 1 addition & 1 deletion src/asm/make_i386_sysv_macho_gas.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _make_fcontext:
andl $-16, %eax

/* reserve space for context-data on context-stack, and align the stack */
leal -0x30(%eax), %eax
leal -0x34(%eax), %eax

/* third arg of make_fcontext() == address of context-function */
/* stored in EBX */
Expand Down

0 comments on commit 0eb4263

Please sign in to comment.