Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 490874 Details for
Bug 629054
=sys-libs/glibc-2.25 and 2.26 don't work on ARCH=ppc with --enable-stack-protector=all: crash in __GI___libc_malloc (bytes=5) at malloc.c:3062
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-powerpc-disable-calculation-of-caller-address-in-mal.patch
0001-powerpc-disable-calculation-of-caller-address-in-mal.patch (text/plain), 1.38 KB, created by
Sergei Trofimovich (RETIRED)
on 2017-08-27 15:04:09 UTC
(
hide
)
Description:
0001-powerpc-disable-calculation-of-caller-address-in-mal.patch
Filename:
MIME Type:
Creator:
Sergei Trofimovich (RETIRED)
Created:
2017-08-27 15:04:09 UTC
Size:
1.38 KB
patch
obsolete
>From 23fff6dd8787e3059146ebda480e74667519b6eb Mon Sep 17 00:00:00 2001 >From: Sergei Trofimovich <slyfox@gentoo.org> >Date: Sun, 27 Aug 2017 15:57:37 +0100 >Subject: [PATCH] powerpc: disable calculation of caller address in malloc > hooks > >At least on powerpc-unknown-linux-gnu the code > __builtin_return_address(0) >generates memory access to uninitialized stack >in -fPIC -fstack-protector-all mode. >This mode is default for gcc-6.3+/glibc-2.25+ in Gentoo. > >Workaround the problem by disabling return address calculation. >Default glibc hooks don't use passed address at all. > >Bug: https://bugs.gentoo.org/629054 >Bug: https://gcc.gnu.org/PR81996 >Bug: https://sourceware.org/PR22016 >Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> >--- > malloc/malloc.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/malloc/malloc.c b/malloc/malloc.c >index e3ff778113..85848dce0a 100644 >--- a/malloc/malloc.c >+++ b/malloc/malloc.c >@@ -995,6 +995,16 @@ int __posix_memalign(void **, size_t, size_t); > > #include <malloc.h> > >+#ifdef __powerpc__ >+/* On 32-bit powerpc gcc genrates incorrect core for >+ * __builtin_return_address in -fstack-protector-all >+ * mode. See https://bugs.gentoo.org/629054 for details. >+ * >+ * As a workaround sdsable resolution of return addresses >+ * in malloc hooks. >+ */ >+#undef RETURN_ADDRESS >+#endif > #ifndef RETURN_ADDRESS > #define RETURN_ADDRESS(X_) (NULL) > #endif >-- >2.14.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 629054
: 490874