This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH] mips: Fix store/load gp registers to/from ucontext_t
This problem manifests in one of breakpad tests which is using value of $sp retrieved by getcontext().
However, all existing context related tests in glibc are passing.
I have a simple test case which manifests getcontext() failure but since it is mips only test I was not sure where to add it. Do you have any suggestion?
I would say that mips N32 and mips64 are not affected by the change, since SZREG for them is 8 as per:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/mips/sys/asm.h;h=9e5df26f3ab59c119b9af9099aa74348eec53484;hb=refs/heads/master#l303
but I will compare library sizes as you suggested.
I will modify the change to support big endian, test it and send the new patch version.
Gordana
________________________________________
From: Joseph Myers [joseph@codesourcery.com]
Sent: Wednesday, May 17, 2017 5:24 PM
To: Gordana Cmiljanovic
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] mips: Fix store/load gp registers to/from ucontext_t
Also: to store in / load from the right places, I'd expect you to need a
4-byte offset on all the GPRs for big-endian, and when accessing other
greg_t fields (in particular pc), so that the correct (low) part of each
64-bit field is used. I don't see such an offset in this patch.
I think that such a patch should be tested for all three ABIs, for both
endiannesses, to provide confidence that the functions remain consistent
with each other in all cases. (For the 64-bit ABIs, it would be enough to
verify that installed stripped shared libraries are unchanged before and
after the patch; given that, it wouldn't be necessary to run the full
testsuite for them. But the full testsuite should be run for both BE and
LE o32.)
--
Joseph S. Myers
joseph@codesourcery.com