This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] mips/o32: fix internal_syscall5/6/7


On 2017-08-15 14:00, Andreas Schwab wrote:
> On Aug 15 2017, Aurelien Jarno <aurelien@aurel32.net> wrote:
> 
> > The internal_syscall5/6/7 functions use the stack pointer to store
> > the 5th and following arguments on the stack. In some cases GCC optimize
> > out the stack pointer, and thus storing the data to the stack causes a
> > segmentation fault.
> 
> FORCE_FRAME_POINTER does not work any more?

From what I understand of the generated code, it seems to work at the
function level, but not at the asm code level. The pthread_rwlock_rdlock
adds a loop around the syscall, and it seems that's the code path causing
the issue. Adding $sp as clobbered changes the code to reload the $sp
from the saved value at each loop.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]