diff --git a/test/Makefile b/test/Makefile index 147a859..dd81d6d 100644 --- a/test/Makefile +++ b/test/Makefile @@ -9,8 +9,12 @@ ifeq (,$(filter $(CONFIG_SLAB_CANARY),true false)) $(error CONFIG_SLAB_CANARY must be true or false) endif -LDLIBS := -lpthread +LDLIBS := -lpthread -lhardened_malloc +dir=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) +LDFLAGS := -Wl,-L$(dir)../out,-R,$(dir)../out + +CXXFLAGS := -std=c++17 -fsized-deallocation CPPFLAGS += \ -DSLAB_CANARY=$(CONFIG_SLAB_CANARY) \ -DCONFIG_EXTENDED_SIZE_CLASSES=$(CONFIG_EXTENDED_SIZE_CLASSES) @@ -20,11 +24,47 @@ EXECUTABLES := \ mallinfo \ mallinfo2 \ malloc_info \ - large_array_growth + large_array_growth \ + double_free_large \ + double_free_large_delayed \ + double_free_small \ + double_free_small_delayed \ + unaligned_free_large \ + unaligned_free_small \ + read_after_free_large \ + read_after_free_small \ + write_after_free_large \ + write_after_free_large_reuse \ + write_after_free_small \ + write_after_free_small_reuse \ + read_zero_size \ + write_zero_size \ + invalid_free_protected \ + invalid_free_unprotected \ + invalid_free_small_region \ + invalid_free_small_region_far \ + uninitialized_read_small \ + uninitialized_read_large \ + uninitialized_free \ + uninitialized_realloc \ + uninitialized_malloc_usable_size \ + overflow_large_1_byte \ + overflow_large_8_byte \ + overflow_small_1_byte \ + overflow_small_8_byte \ + string_overflow \ + delete_type_size_mismatch \ + unaligned_malloc_usable_size_small \ + invalid_malloc_usable_size_small \ + invalid_malloc_usable_size_small_quarantine \ + malloc_object_size \ + malloc_object_size_offset \ + invalid_malloc_object_size_small \ + invalid_malloc_object_size_small_quarantine \ + impossibly_large_malloc + all: $(EXECUTABLES) - $(MAKE) -C simple-memory-corruption clean: rm -f $(EXECUTABLES) - $(MAKE) -C simple-memory-corruption clean diff --git a/test/simple-memory-corruption/__init__.py b/test/__init__.py similarity index 100% rename from test/simple-memory-corruption/__init__.py rename to test/__init__.py diff --git a/test/simple-memory-corruption/delete_type_size_mismatch.cc b/test/delete_type_size_mismatch.cc similarity index 87% rename from test/simple-memory-corruption/delete_type_size_mismatch.cc rename to test/delete_type_size_mismatch.cc index ffbb731..92bb374 100644 --- a/test/simple-memory-corruption/delete_type_size_mismatch.cc +++ b/test/delete_type_size_mismatch.cc @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" struct foo { uint64_t a, b, c, d; diff --git a/test/simple-memory-corruption/double_free_large.c b/test/double_free_large.c similarity index 86% rename from test/simple-memory-corruption/double_free_large.c rename to test/double_free_large.c index 3802af0..ee740e1 100644 --- a/test/simple-memory-corruption/double_free_large.c +++ b/test/double_free_large.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { void *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/double_free_large_delayed.c b/test/double_free_large_delayed.c similarity index 90% rename from test/simple-memory-corruption/double_free_large_delayed.c rename to test/double_free_large_delayed.c index ef0d4b8..232a812 100644 --- a/test/simple-memory-corruption/double_free_large_delayed.c +++ b/test/double_free_large_delayed.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { void *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/double_free_small.c b/test/double_free_small.c similarity index 85% rename from test/simple-memory-corruption/double_free_small.c rename to test/double_free_small.c index 4635d36..94ab0ba 100644 --- a/test/simple-memory-corruption/double_free_small.c +++ b/test/double_free_small.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { void *p = malloc(16); diff --git a/test/simple-memory-corruption/double_free_small_delayed.c b/test/double_free_small_delayed.c similarity index 89% rename from test/simple-memory-corruption/double_free_small_delayed.c rename to test/double_free_small_delayed.c index acb4034..5a9a34e 100644 --- a/test/simple-memory-corruption/double_free_small_delayed.c +++ b/test/double_free_small_delayed.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { void *p = malloc(16); diff --git a/test/simple-memory-corruption/impossibly_large_malloc.c b/test/impossibly_large_malloc.c similarity index 82% rename from test/simple-memory-corruption/impossibly_large_malloc.c rename to test/impossibly_large_malloc.c index 3341ea5..42b35df 100644 --- a/test/simple-memory-corruption/impossibly_large_malloc.c +++ b/test/impossibly_large_malloc.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(-8); diff --git a/test/simple-memory-corruption/invalid_free_protected.c b/test/invalid_free_protected.c similarity index 91% rename from test/simple-memory-corruption/invalid_free_protected.c rename to test/invalid_free_protected.c index ee81467..0364baa 100644 --- a/test/simple-memory-corruption/invalid_free_protected.c +++ b/test/invalid_free_protected.c @@ -2,7 +2,7 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { free(malloc(16)); diff --git a/test/simple-memory-corruption/invalid_free_small_region.c b/test/invalid_free_small_region.c similarity index 86% rename from test/simple-memory-corruption/invalid_free_small_region.c rename to test/invalid_free_small_region.c index 4993724..81cfbf2 100644 --- a/test/simple-memory-corruption/invalid_free_small_region.c +++ b/test/invalid_free_small_region.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/invalid_free_small_region_far.c b/test/invalid_free_small_region_far.c similarity index 87% rename from test/simple-memory-corruption/invalid_free_small_region_far.c rename to test/invalid_free_small_region_far.c index c147ef3..c35c1ba 100644 --- a/test/simple-memory-corruption/invalid_free_small_region_far.c +++ b/test/invalid_free_small_region_far.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/invalid_free_unprotected.c b/test/invalid_free_unprotected.c similarity index 91% rename from test/simple-memory-corruption/invalid_free_unprotected.c rename to test/invalid_free_unprotected.c index c583c6b..26254ab 100644 --- a/test/simple-memory-corruption/invalid_free_unprotected.c +++ b/test/invalid_free_unprotected.c @@ -2,7 +2,7 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { free(malloc(16)); diff --git a/test/simple-memory-corruption/invalid_malloc_object_size_small.c b/test/invalid_malloc_object_size_small.c similarity index 89% rename from test/simple-memory-corruption/invalid_malloc_object_size_small.c rename to test/invalid_malloc_object_size_small.c index 126ff2b..9adac5f 100644 --- a/test/simple-memory-corruption/invalid_malloc_object_size_small.c +++ b/test/invalid_malloc_object_size_small.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" size_t malloc_object_size(void *ptr); diff --git a/test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c b/test/invalid_malloc_object_size_small_quarantine.c similarity index 88% rename from test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c rename to test/invalid_malloc_object_size_small_quarantine.c index 168dc23..9a365ae 100644 --- a/test/simple-memory-corruption/invalid_malloc_object_size_small_quarantine.c +++ b/test/invalid_malloc_object_size_small_quarantine.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" size_t malloc_object_size(void *ptr); diff --git a/test/simple-memory-corruption/invalid_malloc_usable_size_small.c b/test/invalid_malloc_usable_size_small.c similarity index 87% rename from test/simple-memory-corruption/invalid_malloc_usable_size_small.c rename to test/invalid_malloc_usable_size_small.c index f200564..440aa6b 100644 --- a/test/simple-memory-corruption/invalid_malloc_usable_size_small.c +++ b/test/invalid_malloc_usable_size_small.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/invalid_malloc_usable_size_small_quarantine.c b/test/invalid_malloc_usable_size_small_quarantine.c similarity index 86% rename from test/simple-memory-corruption/invalid_malloc_usable_size_small_quarantine.c rename to test/invalid_malloc_usable_size_small_quarantine.c index ae0a8c6..926acd7 100644 --- a/test/simple-memory-corruption/invalid_malloc_usable_size_small_quarantine.c +++ b/test/invalid_malloc_usable_size_small_quarantine.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { void *p = malloc(16); diff --git a/test/simple-memory-corruption/malloc_object_size.c b/test/malloc_object_size.c similarity index 89% rename from test/simple-memory-corruption/malloc_object_size.c rename to test/malloc_object_size.c index 04e6350..0710557 100644 --- a/test/simple-memory-corruption/malloc_object_size.c +++ b/test/malloc_object_size.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" size_t malloc_object_size(void *ptr); diff --git a/test/simple-memory-corruption/malloc_object_size_offset.c b/test/malloc_object_size_offset.c similarity index 89% rename from test/simple-memory-corruption/malloc_object_size_offset.c rename to test/malloc_object_size_offset.c index 2bc16b6..3e30be9 100644 --- a/test/simple-memory-corruption/malloc_object_size_offset.c +++ b/test/malloc_object_size_offset.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" size_t malloc_object_size(void *ptr); diff --git a/test/simple-memory-corruption/overflow_large_1_byte.c b/test/overflow_large_1_byte.c similarity index 89% rename from test/simple-memory-corruption/overflow_large_1_byte.c rename to test/overflow_large_1_byte.c index b759654..a74bbfd 100644 --- a/test/simple-memory-corruption/overflow_large_1_byte.c +++ b/test/overflow_large_1_byte.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/overflow_large_8_byte.c b/test/overflow_large_8_byte.c similarity index 90% rename from test/simple-memory-corruption/overflow_large_8_byte.c rename to test/overflow_large_8_byte.c index a067420..4c7d15c 100644 --- a/test/simple-memory-corruption/overflow_large_8_byte.c +++ b/test/overflow_large_8_byte.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/overflow_small_1_byte.c b/test/overflow_small_1_byte.c similarity index 89% rename from test/simple-memory-corruption/overflow_small_1_byte.c rename to test/overflow_small_1_byte.c index 3aa8206..f4f60e1 100644 --- a/test/simple-memory-corruption/overflow_small_1_byte.c +++ b/test/overflow_small_1_byte.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(8); diff --git a/test/simple-memory-corruption/overflow_small_8_byte.c b/test/overflow_small_8_byte.c similarity index 91% rename from test/simple-memory-corruption/overflow_small_8_byte.c rename to test/overflow_small_8_byte.c index fd9666e..4256d54 100644 --- a/test/simple-memory-corruption/overflow_small_8_byte.c +++ b/test/overflow_small_8_byte.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(8); diff --git a/test/simple-memory-corruption/read_after_free_large.c b/test/read_after_free_large.c similarity index 93% rename from test/simple-memory-corruption/read_after_free_large.c rename to test/read_after_free_large.c index cec3e9b..f5fa18c 100644 --- a/test/simple-memory-corruption/read_after_free_large.c +++ b/test/read_after_free_large.c @@ -2,7 +2,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/read_after_free_small.c b/test/read_after_free_small.c similarity index 92% rename from test/simple-memory-corruption/read_after_free_small.c rename to test/read_after_free_small.c index 9451a01..2a969ab 100644 --- a/test/simple-memory-corruption/read_after_free_small.c +++ b/test/read_after_free_small.c @@ -2,7 +2,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/read_zero_size.c b/test/read_zero_size.c similarity index 86% rename from test/simple-memory-corruption/read_zero_size.c rename to test/read_zero_size.c index 385f4d6..53838f2 100644 --- a/test/simple-memory-corruption/read_zero_size.c +++ b/test/read_zero_size.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(0); diff --git a/test/simple-memory-corruption/.gitignore b/test/simple-memory-corruption/.gitignore deleted file mode 100644 index a242ebe..0000000 --- a/test/simple-memory-corruption/.gitignore +++ /dev/null @@ -1,38 +0,0 @@ -delete_type_size_mismatch -double_free_large -double_free_large_delayed -double_free_small -double_free_small_delayed -invalid_free_protected -invalid_free_small_region -invalid_free_small_region_far -invalid_free_unprotected -read_after_free_large -read_after_free_small -read_zero_size -string_overflow -unaligned_free_large -unaligned_free_small -uninitialized_free -uninitialized_malloc_usable_size -uninitialized_realloc -write_after_free_large -write_after_free_large_reuse -write_after_free_small -write_after_free_small_reuse -write_zero_size -unaligned_malloc_usable_size_small -invalid_malloc_usable_size_small -invalid_malloc_usable_size_small_quarantine -malloc_object_size -malloc_object_size_offset -invalid_malloc_object_size_small -invalid_malloc_object_size_small_quarantine -impossibly_large_malloc -overflow_large_1_byte -overflow_large_8_byte -overflow_small_1_byte -overflow_small_8_byte -uninitialized_read_large -uninitialized_read_small -__pycache__/ diff --git a/test/simple-memory-corruption/Makefile b/test/simple-memory-corruption/Makefile deleted file mode 100644 index d13e3dd..0000000 --- a/test/simple-memory-corruption/Makefile +++ /dev/null @@ -1,59 +0,0 @@ -dir=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) - -CONFIG_SLAB_CANARY := true -CXXFLAGS := -std=c++17 -fsized-deallocation - -ifeq (,$(filter $(CONFIG_SLAB_CANARY),true false)) - $(error CONFIG_SLAB_CANARY must be true or false) -endif - -CPPFLAGS += -D_GNU_SOURCE \ - -DSLAB_CANARY=$(CONFIG_SLAB_CANARY) - -LDLIBS := -lhardened_malloc - -LDFLAGS := -Wl,-L$(dir)../../out,-R,$(dir)../../out - -EXECUTABLES := \ - double_free_large \ - double_free_large_delayed \ - double_free_small \ - double_free_small_delayed \ - unaligned_free_large \ - unaligned_free_small \ - read_after_free_large \ - read_after_free_small \ - write_after_free_large \ - write_after_free_large_reuse \ - write_after_free_small \ - write_after_free_small_reuse \ - read_zero_size \ - write_zero_size \ - invalid_free_protected \ - invalid_free_unprotected \ - invalid_free_small_region \ - invalid_free_small_region_far \ - uninitialized_read_small \ - uninitialized_read_large \ - uninitialized_free \ - uninitialized_realloc \ - uninitialized_malloc_usable_size \ - overflow_large_1_byte \ - overflow_large_8_byte \ - overflow_small_1_byte \ - overflow_small_8_byte \ - string_overflow \ - delete_type_size_mismatch \ - unaligned_malloc_usable_size_small \ - invalid_malloc_usable_size_small \ - invalid_malloc_usable_size_small_quarantine \ - malloc_object_size \ - malloc_object_size_offset \ - invalid_malloc_object_size_small \ - invalid_malloc_object_size_small_quarantine \ - impossibly_large_malloc - -all: $(EXECUTABLES) - -clean: - rm -f $(EXECUTABLES) diff --git a/test/simple-memory-corruption/string_overflow.c b/test/string_overflow.c similarity index 92% rename from test/simple-memory-corruption/string_overflow.c rename to test/string_overflow.c index 7f54a63..c2dda6d 100644 --- a/test/simple-memory-corruption/string_overflow.c +++ b/test/string_overflow.c @@ -4,7 +4,7 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/test_smc.py b/test/test_smc.py similarity index 100% rename from test/simple-memory-corruption/test_smc.py rename to test/test_smc.py diff --git a/test/simple-memory-corruption/unaligned_free_large.c b/test/unaligned_free_large.c similarity index 85% rename from test/simple-memory-corruption/unaligned_free_large.c rename to test/unaligned_free_large.c index 73c469b..7c42347 100644 --- a/test/simple-memory-corruption/unaligned_free_large.c +++ b/test/unaligned_free_large.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/unaligned_free_small.c b/test/unaligned_free_small.c similarity index 84% rename from test/simple-memory-corruption/unaligned_free_small.c rename to test/unaligned_free_small.c index 1b2a7fc..25ca757 100644 --- a/test/simple-memory-corruption/unaligned_free_small.c +++ b/test/unaligned_free_small.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/unaligned_malloc_usable_size_small.c b/test/unaligned_malloc_usable_size_small.c similarity index 85% rename from test/simple-memory-corruption/unaligned_malloc_usable_size_small.c rename to test/unaligned_malloc_usable_size_small.c index 2bbbf8a..c897c0d 100644 --- a/test/simple-memory-corruption/unaligned_malloc_usable_size_small.c +++ b/test/unaligned_malloc_usable_size_small.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(16); diff --git a/test/simple-memory-corruption/uninitialized_free.c b/test/uninitialized_free.c similarity index 76% rename from test/simple-memory-corruption/uninitialized_free.c rename to test/uninitialized_free.c index 9e3c8b9..1ba3fcf 100644 --- a/test/simple-memory-corruption/uninitialized_free.c +++ b/test/uninitialized_free.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { free((void *)1); diff --git a/test/simple-memory-corruption/uninitialized_malloc_usable_size.c b/test/uninitialized_malloc_usable_size.c similarity index 79% rename from test/simple-memory-corruption/uninitialized_malloc_usable_size.c rename to test/uninitialized_malloc_usable_size.c index d0644c4..f2abfd1 100644 --- a/test/simple-memory-corruption/uninitialized_malloc_usable_size.c +++ b/test/uninitialized_malloc_usable_size.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { malloc_usable_size((void *)1); diff --git a/test/simple-memory-corruption/uninitialized_read_large.c b/test/uninitialized_read_large.c similarity index 89% rename from test/simple-memory-corruption/uninitialized_read_large.c rename to test/uninitialized_read_large.c index b47ac0d..03400ad 100644 --- a/test/simple-memory-corruption/uninitialized_read_large.c +++ b/test/uninitialized_read_large.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/uninitialized_read_small.c b/test/uninitialized_read_small.c similarity index 88% rename from test/simple-memory-corruption/uninitialized_read_small.c rename to test/uninitialized_read_small.c index 79c02ef..92bdf10 100644 --- a/test/simple-memory-corruption/uninitialized_read_small.c +++ b/test/uninitialized_read_small.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(8); diff --git a/test/simple-memory-corruption/uninitialized_realloc.c b/test/uninitialized_realloc.c similarity index 84% rename from test/simple-memory-corruption/uninitialized_realloc.c rename to test/uninitialized_realloc.c index 4afc9de..ef173f6 100644 --- a/test/simple-memory-corruption/uninitialized_realloc.c +++ b/test/uninitialized_realloc.c @@ -1,6 +1,6 @@ #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { void *p = realloc((void *)1, 16); diff --git a/test/simple-memory-corruption/write_after_free_large.c b/test/write_after_free_large.c similarity index 88% rename from test/simple-memory-corruption/write_after_free_large.c rename to test/write_after_free_large.c index 1ff446e..e431916 100644 --- a/test/simple-memory-corruption/write_after_free_large.c +++ b/test/write_after_free_large.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/write_after_free_large_reuse.c b/test/write_after_free_large_reuse.c similarity index 82% rename from test/simple-memory-corruption/write_after_free_large_reuse.c rename to test/write_after_free_large_reuse.c index 586aa4c..e802035 100644 --- a/test/simple-memory-corruption/write_after_free_large_reuse.c +++ b/test/write_after_free_large_reuse.c @@ -1,8 +1,8 @@ #include #include -#include "../test_util.h" -#include "../../util.h" +#include "test_util.h" +#include "../util.h" OPTNONE int main(void) { char *p = malloc(256 * 1024); diff --git a/test/simple-memory-corruption/write_after_free_small.c b/test/write_after_free_small.c similarity index 91% rename from test/simple-memory-corruption/write_after_free_small.c rename to test/write_after_free_small.c index c78325e..0334ae9 100644 --- a/test/simple-memory-corruption/write_after_free_small.c +++ b/test/write_after_free_small.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(128); diff --git a/test/simple-memory-corruption/write_after_free_small_reuse.c b/test/write_after_free_small_reuse.c similarity index 86% rename from test/simple-memory-corruption/write_after_free_small_reuse.c rename to test/write_after_free_small_reuse.c index d6250f0..fb8071a 100644 --- a/test/simple-memory-corruption/write_after_free_small_reuse.c +++ b/test/write_after_free_small_reuse.c @@ -1,8 +1,8 @@ #include #include -#include "../test_util.h" -#include "../../util.h" +#include "test_util.h" +#include "../util.h" OPTNONE int main(void) { char *p = malloc(128); diff --git a/test/simple-memory-corruption/write_zero_size.c b/test/write_zero_size.c similarity index 85% rename from test/simple-memory-corruption/write_zero_size.c rename to test/write_zero_size.c index 3687bf9..1b54216 100644 --- a/test/simple-memory-corruption/write_zero_size.c +++ b/test/write_zero_size.c @@ -1,7 +1,7 @@ #include #include -#include "../test_util.h" +#include "test_util.h" OPTNONE int main(void) { char *p = malloc(0);