Summary: | =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 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sergei Trofimovich (RETIRED) <slyfox> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ppc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://sourceware.org/bugzilla/show_bug.cgi?id=22016 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 628180 | ||
Attachments: | 0001-powerpc-disable-calculation-of-caller-address-in-mal.patch |
Description
Sergei Trofimovich (RETIRED)
2017-08-27 12:25:50 UTC
glibc-2.24 happens to work on powerpc because it was the last version where gentoo did not enable glibc stack protection by default: if version_is_at_least 2.25 ; then myconf+=( --enable-stack-protector=all ) fi Created attachment 490874 [details, diff]
0001-powerpc-disable-calculation-of-caller-address-in-mal.patch
Attached patch that avoids early chars and renders glibc mostly working.
'$ make check' output:
Summary of test results:
64 FAIL
3659 PASS
8 UNSUPPORTED
29 XFAIL
2 XPASS
(In reply to Sergei Trofimovich from comment #2) > Created attachment 490874 [details, diff] [details, diff] > 0001-powerpc-disable-calculation-of-caller-address-in-mal.patch > > Attached patch that avoids early chars and renders glibc mostly working. > > '$ make check' output: > > Summary of test results: > 64 FAIL > 3659 PASS > 8 UNSUPPORTED > 29 XFAIL > 2 XPASS And it's not ebough. Basic sanity checks pass but emerge still SIGSEGVs. Bug has been referenced in the following commit: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=604495b43aa4a5b7aed2044b84ca0d88e600d1df commit 604495b43aa4a5b7aed2044b84ca0d88e600d1df Author: Sergei Trofimovich <slyfox@gentoo.org> AuthorDate: 2017-09-10 09:45:39 +0000 Commit: Sergei Trofimovich <slyfox@gentoo.org> CommitDate: 2017-09-10 10:12:18 +0000 glibc: disable stack protector on ARCH=ppc Currently gcc on powerpc32 generates invalid code for __builtin_return_address(0) calls. Normally programs don't do that but malloc() hooks in glibc do: Bug: https://gcc.gnu.org/PR81996 Bug: https://bugs.gentoo.org/629054 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> eclass/toolchain-glibc.eclass | 14 +++++++++++++- sys-libs/glibc/glibc-2.26-r1.ebuild | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) |