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 Wed, 17 May 2017, 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.

Is this a user-visible bug (for which a testcase could be written, in 
which case one should be added and a bug filed in Bugzilla)?  Or is it not 
user-visible because the functions are consistent with each other (hence 
all the existing tests passing), just not with the intended structure 
layout, and calling setcontext with a context from a signal handler has 
unspecified results anyway?

-- 
Joseph S. Myers
joseph@codesourcery.com


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