hardened_malloc/test/simple-memory-corruption/Makefile

61 lines
1.6 KiB
Makefile
Raw Normal View History

dir=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
CONFIG_SLAB_CANARY := true
# Clang 13 still doesn't enable sized deallocation by default
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
2022-01-09 17:08:56 +01:00
LDFLAGS := -Wl,-L$(dir)../../out,-R,$(dir)../../out
EXECUTABLES := \
double_free_large \
2018-08-24 11:53:17 +02:00
double_free_large_delayed \
double_free_small \
2018-08-24 11:53:17 +02:00
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 \
2018-08-24 10:45:48 +02:00
invalid_free_protected \
invalid_free_unprotected \
invalid_free_small_region \
invalid_free_small_region_far \
uninitialized_read_small \
uninitialized_read_large \
2018-08-24 11:02:00 +02:00
uninitialized_free \
uninitialized_realloc \
uninitialized_malloc_usable_size \
2022-01-04 03:20:15 +01:00
overflow_large_1_byte \
overflow_large_8_byte \
overflow_small_1_byte \
overflow_small_8_byte \
2018-10-11 07:44:41 +02:00
string_overflow \
2020-04-16 06:02:16 +02:00
delete_type_size_mismatch \
2020-09-17 23:23:13 +02:00
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)