Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832946 - app-shells/bash[mem-scramble] broken on hppa
Summary: app-shells/bash[mem-scramble] broken on hppa
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: HPPA Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Blocks: 915000
  Show dependency tree
Reported: 2022-02-08 18:15 UTC by Arthur Zamarin
Modified: 2024-05-18 09:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-02-08 18:15:03 UTC
Tested on

As a mistake on my part, I have tried to emerge "app-shells/bash[mem-scramble]" as part of "tatt" run for stable bug.
After successful emerge of app-shells/bash-5.1_p16, the very next runs of emerge were failing in very weird places, mainly during pkg_setup, with seg faults like:

/usr/lib/portage/python3.9/ xmalloc: variables.c:4849: cannot allocate 1666 bytes (2646016 bytes allocated)
/var/db/repos/gentoo/eclass/flag-o-matic.eclass: xmalloc: make_cmd.c:464: cannot allocate 24 bytes (2150400 bytes allocated)

Any successive run of emerge was always failing. No build log was created for those fails!

Fixed by using `emerge --root ... -a app-shells/bash` with default USE flags from outside the chroot.

For now, I'm masking that USE flag on hppa.
Comment 1 Larry the Git Cow gentoo-dev 2022-02-08 18:18:00 UTC
The bug has been referenced in the following commit(s):

commit 5f94b34dfbc2c96ae99d729ea7b10011ff8dc9fa
Author:     Arthur Zamarin <>
AuthorDate: 2022-02-08 18:17:07 +0000
Commit:     Arthur Zamarin <>
CommitDate: 2022-02-08 18:17:07 +0000

    profiles/arch/hppa: mask app-shells/bash[mem-scramble]
    Signed-off-by: Arthur Zamarin <>

 profiles/arch/hppa/package.use.mask | 4 ++++
 1 file changed, 4 insertions(+)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-13 22:12:23 UTC
I started poking at this but my home HPPA box isn't going to be in action for about a month more so not had a chance to resume.

USE=mem-scramble uses Bash's own malloc (no surprise there).

We're failing at
>      allocated = findbrk ();
>      fatal_error (_("%s: cannot allocate %lu bytes (%lu bytes allocated)"), >func, (unsigned long)bytes, (unsigned long)allocated);

The implementation of findbrk looks of interest (
>static size_t
>findbrk ()
>  return (char *)sbrk (0) - (char *)lbreak;

More on sbrk at

It's not clear to me that this is stack-direction independent, but I'm not sure:
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2022-04-25 22:48:25 UTC
Not a toolchain problem.