[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sigsp on Hurd/x86_64

From: Bruno Haible
Subject: sigsp on Hurd/x86_64
Date: Fri, 12 May 2023 21:15:03 +0200


In the file glibc/sysdeps/mach/hurd/x86/trampoline.c lines 199..204

#ifdef __x86_64__
  /* Align SP at 16 bytes.  Coupled with the fact that sigreturn_addr is
     16-byte aligned within the stackframe struct, this ensures that it ends
     up on a 16-byte aligned address, as required by the ABI.  */
  sigsp = (void *) ((uintptr_t) sigsp & 16UL);

make no sense to me. After this statement, sigsp is
either 0x0000000000000000
or     0x0000000000000010.

If aligning SP is intended, the line should read

  sigsp = (void *) ((uintptr_t) sigsp & -16UL);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]