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: 20
Popularity: 0.022768
First Submitted: 2019-08-18 21:53 (UTC)
Last Updated: 2024-10-14 13:50 (UTC)

Latest Comments

1 2 Next › Last »

koro666 commented on 2026-06-12 06:58 (UTC)

Patch for version 14 + fix build on GCC16:

diff --git a/PKGBUILD b/PKGBUILD
index 07b3d51..06658f9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Thibaut Sautereau (thithib) <thibaut at sautereau dot fr>

 pkgname=hardened_malloc
-pkgver=13
+pkgver=14
 pkgrel=1
 pkgdesc="Hardened allocator designed for modern systems"
 arch=('x86_64')
@@ -11,8 +11,14 @@ depends=('gcc-libs')
 makedepends=('git')
 checkdepends=('python')
 provides=('libhardened_malloc.so' 'libhardened_malloc-light.so')
-source=("git+https://github.com/GrapheneOS/$pkgname#tag=$pkgver")
-sha256sums=('3e48dcfd888b3a871c0d59c6757ab328eb008e1951843c1dc75225432a4bf7db')
+source=("git+https://github.com/GrapheneOS/$pkgname#tag=$pkgver" 'gcc16.patch')
+sha256sums=('02f883d1924df3ab05304b46abea0c6108f90252e04afcf9909d16a1ed19911a'
+            '82736f9e6eca4e9582f6bb0446b7c4fb97ca9ccafef54f86ae059a2ab142ba04')
+
+prepare() {
+  cd "$pkgname"
+  patch -p1 -i ../gcc16.patch
+}

 build() {
   cd "$pkgname"
diff --git a/gcc16.patch b/gcc16.patch
new file mode 100644
index 0000000..1eb242f
--- /dev/null
+++ b/gcc16.patch
@@ -0,0 +1,19 @@
+commit 04a25bd141efcd2c0d29ef7d868b205a844b3ad2
+Author: underscorejoser <259754904+underscorejoser@users.noreply.github.com>
+Date:   Mon Mar 9 03:07:29 2026 -0300
+
+    Support GCC16
+
+diff --git a/new.cc b/new.cc
+index 165e19e..885ed94 100644
+--- a/new.cc
++++ b/new.cc
+@@ -1,5 +1,7 @@
+ // needed with libstdc++ but not libc++
+-#if __has_include(<bits/functexcept.h>)
++#if __has_include(<bits/new_throw.h>)
++#include <bits/new_throw.h>
++#elif __has_include(<bits/functexcept.h>)
+ #include <bits/functexcept.h>
+ #endif
+ 

acrion commented on 2026-04-09 12:24 (UTC)

Fails to build on current Arch (GCC 15 is now the default) due to -Werror combined with the new -Wunterminated-string-initialization warning in chacha.c. Please add CFLAGS+=" -Wno-unterminated-string-initialization" before the make calls in build() (which fixes it).

kman1990 commented on 2024-06-15 16:04 (UTC)

Attempting to update from 11-1 to 12-1 results in build failure.

Error trace:
FAIL: test_realloc_init (test_smc.TestSimpleMemoryCorruption.test_realloc_init)

Traceback (most recent call last): File "/home/USER/.cache/yay/hardened_malloc/src/hardened_malloc/test/test_smc.py", line 239, in test_realloc_init self.assertEqual(returncode, 0) AssertionError: -11 != 0


Ran 38 tests in 2.368s

FAILED (failures=1)

gcb0 commented on 2024-03-26 19:27 (UTC)

here's the patch to build v12. I'm still dealing with account recovery annoyances on gitlab, thanks to google for wiping out my phone. lesson learned...

--- PKGBUILD
+++ PKGBUILD
@@ -1,7 +1,7 @@
 # Maintiner: Thibaut Sautereau (thithib) <thibaut at sautereau dot fr>

 pkgname=hardened_malloc
-pkgver=11
+pkgver=12
 pkgrel=1
 pkgdesc="Hardened allocator designed for modern systems"
 arch=('x86_64')
@@ -9,14 +9,15 @@ url="https://github.com/GrapheneOS/hardened_malloc"
 license=('MIT')
 depends=('gcc-libs')
 makedepends=('git')
 checkdepends=('python')
 provides=('libhardened_malloc.so' 'libhardened_malloc-light.so')
 source=("git+https://github.com/GrapheneOS/$pkgname#tag=$pkgver?signed")
-sha256sums=('SKIP')
+sha256sums=('0e683c105fe17ccd23060ad3f5f3ce62b989cb80ef8ce95f70efc63bf63974d6')
 validpgpkeys=('65EEFE022108E2B708CBFCF7F9E712E59AF5F22A') # Daniel Micay <danielmicay@gmail.com>

 build() {
   cd "$pkgname"
+  make test
   make VARIANT=default
   make VARIANT=light
 }

bbgun7 commented on 2024-01-17 17:16 (UTC)

I'm getting FAILED (unknown public key F9E712E59AF5F22A), but that key shows up in the list when I do sudo pacman-key --refresh-keys. I also tried sudo pacman-key --recv-keys F9E712E59AF5F22A but it still doesn't work after that. Anybody know why that might be?

shtrophic commented on 2023-09-26 02:44 (UTC)

I suggest switching arch to any, since this package can also be built and used on archlinuxarm.

thestinger commented on 2022-01-23 23:38 (UTC)

You should be able to remove CONFIG_WERROR=false for make test for version 11.

The flags for the library weren't meant to be inherited by the tests. Having environment variables exported for CFLAGS, etc. was causing them to get applied for the test Makefile too. That's now resolved.

mynacol commented on 2022-01-12 20:59 (UTC)

hardened_malloc 10 was just released. A new light build variant is included, which should be packaged by this project as well. See https://twitter.com/GrapheneOS/status/1481364976317120512

thithib commented on 2021-11-04 23:00 (UTC)

I sent a pull request to fix the test suite build issue and it's been merged: https://github.com/GrapheneOS/hardened_malloc/pull/151. I'll backport the patch and release a new version of the package.

rhlobo commented on 2021-07-20 08:16 (UTC)

In the PKGBUILD, inside the "check" function add the line:

CPPFLAGS=-I/usr/include

before the make command.