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: Fix store/load gp registers to/from ucontext_t



On 17/05/2017 10:41, Gordana Cmiljanovic wrote:
> More details, not to be included in the commit message:
> 
> get/set/make/swap context implementations for MIPS O32
> incorrectly assume general purpose registers are 32bit
> but they are defined as 64bit in mcontext_t structure, as per:
> 
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/mips/sys/ucontext.h;h=f766dacd205f49a479f17b19df476a8103f55a2e;hb=refs/heads/master#l35
> and
> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/mips/sys/ucontext.h;h=f766dacd205f49a479f17b19df476a8103f55a2e;hb=refs/heads/master#l68
> 
> This leads to incorrect general purpose register values.
> 

Since it seems to be a user-visible bug it requires an assigned
bugzilla for it.  Also, what kind of incorrect register value
are you seeing? I am asking because it seems that, although the
each member individually is accessed by a wrong offset (an the
allocated area for gregs is the double of required), I can see
why the restored value would be different than the saved one
(it is now a block for this fix though, just trying to understand
why this issue has not been seen on mips yet).


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