Package Details: hardened_malloc 13-1

Git Clone URL: https://aur.archlinux.org/hardened_malloc.git (read-only, click to copy)
Package Base: hardened_malloc
Description: Hardened allocator designed for modern systems
Upstream URL: https://github.com/GrapheneOS/hardened_malloc
Licenses: MIT
Provides: libhardened_malloc-light.so, libhardened_malloc.so
Submitter: thithib
Maintainer: thithib
Last Packager: thithib
Votes: 18
Popularity: 0.85
First Submitted: 2019-08-18 21:53 (UTC)
Last Updated: 2024-10-14 13:50 (UTC)

Latest Comments

« First ‹ Previous 1 2

thithib commented on 2021-06-03 15:10 (UTC)

So I just hit the same problem as both of you after updating my makepkg configuration file and it turns out the compilation error happens when CPPFLAGS is not set, which I guess is somehow not OK for hardened_malloc's Makefile.

rando commented on 2021-05-23 10:32 (UTC)

Hi! I have exactly the same problem as @dreieck. I tried clearing the Yay cache to force a download of the sources, and the problem persists. @thithib, would you mind having a look? Thanks a lot for maintaining this package!

thithib commented on 2021-04-24 18:37 (UTC)

@dreieck That's weird, I just checked again and it works fine for me.

dreieck commented on 2021-04-24 12:56 (UTC)

Fails to check() for me:

[...]
cc   -g0 -march=x86-64 -mtune=native -O3 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fomit-frame-pointer -fPIC -std=c11 -O3 -flto -fPIC -fvisibility=hidden -fno-plt -fstack-clash-protection -fstack-protector-strong -pipe -Wall -Wextra -Wcast-align=strict -Wcast-qual -Wwrite-strings -march=native -Wmissing-prototypes -DSLAB_CANARY=true  -Wl,-L/[...]/hardened_malloc/src/hardened_malloc/test/simple-memory-corruption/../../,-R,/[...]/hardened_malloc/src/hardened_malloc/test/simple-memory-corruption/../../  invalid_free_protected.c  -lhardened_malloc -o invalid_free_protected
invalid_free_protected.c: In function ‘main’:
invalid_free_protected.c:9:48: error: ‘MAP_ANONYMOUS’ undeclared (first use in this function)
    9 |     char *p = mmap(NULL, 4096 * 16, PROT_NONE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0);
      |                                                ^~~~~~~~~~~~~
invalid_free_protected.c:9:48: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [<builtin>: invalid_free_protected] Error 1
make[2]: Leaving directory '/[...]/hardened_malloc/src/hardened_malloc/test/simple-memory-corruption'
make[1]: *** [Makefile:21: all] Error 2
make[1]: Leaving directory '/[...]/hardened_malloc/src/hardened_malloc/test'
make: *** [Makefile:138: test] Error 2
==> ERROR: A failure occurred in check().
    Aborting...

thithib commented on 2019-09-30 21:09 (UTC)

Thanks @egrupled, I'll do that ;)

egrupled commented on 2019-09-27 12:20 (UTC)

Hi @thithib thx for packaging this. I have small feature request - could you use git tag instead of tarball and check gpg signature on it? Like below:

# Maintainer: Thibaut Sautereau (thithib) <thibaut at sautereau dot fr>

pkgname=hardened_malloc
pkgver=2
pkgrel=1
pkgdesc="Hardened allocator designed for modern systems"
arch=('x86_64')
url="https://github.com/GrapheneOS/hardened_malloc"
license=('MIT')
depends=('python' 'bash')
makedepends=('git')
conflicts=('hardened-malloc-git')
source=("git+https://github.com/GrapheneOS/hardened_malloc#tag=$pkgver?signed"
        'preload.sh')
sha256sums=('SKIP'
            'e6dbce7ac1d689fafbc94ffb17d8c4ae5271dd3580421828d35aac2c067b652d')
validpgpkeys=('65EEFE022108E2B708CBFCF7F9E712E59AF5F22A')

build() {
  cd "$pkgname"
  make
}

package() {
  cd "$pkgname"
  install -Dm755 --target-directory="$pkgdir/usr/lib" libhardened_malloc.so
  install -Dm755 "$srcdir/preload.sh" "$pkgdir/usr/bin/hardened_malloc_preload"
  install -Dm755 calculate_waste.py "$pkgdir/usr/bin/hardened_malloc_calculate_waste.py"
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim:set ts=2 sw=2 et: