Merge pull request #157413 from prusnak/graphene-hardened-malloc

graphene-hardened-malloc: 8 -> 11

authored by Robert Scott and committed by GitHub 6b4d3add 858b460f

+15 -8
+15 -8
pkgs/development/libraries/graphene-hardened-malloc/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, python3, runCommand, makeWrapper, stress-ng }: 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , python3 5 + , runCommand 6 + , makeWrapper 7 + , stress-ng 8 + }: 2 9 3 10 lib.fix (self: stdenv.mkDerivation rec { 4 11 pname = "graphene-hardened-malloc"; 5 - version = "8"; 12 + version = "11"; 6 13 7 14 src = fetchFromGitHub { 8 15 owner = "GrapheneOS"; 9 16 repo = "hardened_malloc"; 10 17 rev = version; 11 - sha256 = "sha256-+5kJb3hhuFTto7zsIymIXl3tpKUOm3v1DCY4EkAOCgo="; 18 + sha256 = "sha256-BbjL0W12QXFmGCzFrFYY6CZZeFbUt0elCGhM+mbL/IU="; 12 19 }; 13 20 14 21 doCheck = true; ··· 20 27 21 28 installPhase = '' 22 29 install -Dm444 -t $out/include include/* 23 - install -Dm444 -t $out/lib libhardened_malloc.so 30 + install -Dm444 -t $out/lib out/libhardened_malloc.so 24 31 25 32 mkdir -p $out/bin 26 33 substitute preload.sh $out/bin/preload-hardened-malloc --replace "\$dir" $out/lib ··· 41 48 # standalone executables. this includes disabling tests for 42 49 # malloc_object_size, which doesn't make sense to use via LD_PRELOAD. 43 50 buildPhase = '' 44 - pushd test/simple-memory-corruption 51 + pushd test 45 52 make LDLIBS= LDFLAGS=-Wl,--unresolved-symbols=ignore-all CXXFLAGS=-lstdc++ 46 53 substituteInPlace test_smc.py \ 47 54 --replace 'test_malloc_object_size' 'dont_test_malloc_object_size' \ 48 55 --replace 'test_invalid_malloc_object_size' 'dont_test_invalid_malloc_object_size' 49 - popd # test/simple-memory-corruption 56 + popd # test 50 57 ''; 51 58 52 59 installPhase = '' 53 60 mkdir -p $out/test 54 - cp -r test/simple-memory-corruption $out/test/simple-memory-corruption 61 + cp -r test $out/test 55 62 56 63 mkdir -p $out/bin 57 64 makeWrapper ${python3.interpreter} $out/bin/run-tests \ 58 - --add-flags "-I -m unittest discover --start-directory $out/test/simple-memory-corruption" 65 + --add-flags "-I -m unittest discover --start-directory $out/test" 59 66 ''; 60 67 }; 61 68 tests = {