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