This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/20004] New: swapcontext for powerpc64 has an instruction missing
- From: "segher at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 26 Apr 2016 19:22:56 +0000
- Subject: [Bug libc/20004] New: swapcontext for powerpc64 has an instruction missing
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=20004
Bug ID: 20004
Summary: swapcontext for powerpc64 has an instruction missing
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: segher at gcc dot gnu.org
CC: drepper.fsp at gmail dot com
Target Milestone: ---
The GCC c-c++-common/asan/swapcontext-test-1.c test fails because
the glibc code does a wild memory access. The following should fix
it (but I haven't actually tested it):
===
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
index a166dcc..ccad1f9 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
@@ -163,6 +163,7 @@ ENTRY(__novec_swapcontext)
cmpdi r0,0
bne L(nv_do_sigret)
+ ld r8,.LC__dl_hwcap@toc(r2)
# ifdef SHARED
/* Load _rtld-global._dl_hwcap. */
ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
===
Also, in my configuration (with _ARCH_PWR6 defined) r8 isn't used
at all anyway.
--
You are receiving this mail because:
You are on the CC list for the bug.