2018-11-17 01:55:35 +05:30
|
|
|
CONFIG_SLAB_CANARY := true
|
2019-06-19 01:21:13 +05:30
|
|
|
CONFIG_EXTENDED_SIZE_CLASSES := true
|
2018-11-17 01:55:35 +05:30
|
|
|
|
2022-01-09 21:38:56 +05:30
|
|
|
ifneq ($(VARIANT),)
|
|
|
|
$(error testing non-default variants not yet supported)
|
|
|
|
endif
|
|
|
|
|
2018-11-17 01:55:35 +05:30
|
|
|
ifeq (,$(filter $(CONFIG_SLAB_CANARY),true false))
|
|
|
|
$(error CONFIG_SLAB_CANARY must be true or false)
|
|
|
|
endif
|
|
|
|
|
2022-01-22 01:17:21 +05:30
|
|
|
dir=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
|
|
|
|
|
2022-01-22 02:54:14 +05:30
|
|
|
CPPFLAGS := \
|
|
|
|
-D_GNU_SOURCE \
|
2019-06-19 01:21:13 +05:30
|
|
|
-DSLAB_CANARY=$(CONFIG_SLAB_CANARY) \
|
|
|
|
-DCONFIG_EXTENDED_SIZE_CLASSES=$(CONFIG_EXTENDED_SIZE_CLASSES)
|
2018-11-17 01:55:35 +05:30
|
|
|
|
2022-01-22 02:54:14 +05:30
|
|
|
SHARED_FLAGS := -O3
|
|
|
|
|
|
|
|
CFLAGS := -std=c17 $(SHARED_FLAGS) -Wmissing-prototypes
|
|
|
|
CXXFLAGS := -std=c++17 -fsized-deallocation $(SHARED_FLAGS)
|
|
|
|
LDFLAGS := -Wl,-L$(dir)../out,-R,$(dir)../out
|
|
|
|
|
|
|
|
LDLIBS := -lpthread -lhardened_malloc
|
|
|
|
|
2018-10-04 12:10:51 +05:30
|
|
|
EXECUTABLES := \
|
2019-04-07 06:19:52 +05:30
|
|
|
offset \
|
2019-05-01 02:17:06 +05:30
|
|
|
mallinfo \
|
2021-05-13 05:37:15 +05:30
|
|
|
mallinfo2 \
|
2019-05-01 02:24:58 +05:30
|
|
|
malloc_info \
|
2022-01-22 01:17:21 +05:30
|
|
|
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
|
|
|
|
|
2018-10-04 12:10:51 +05:30
|
|
|
all: $(EXECUTABLES)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(EXECUTABLES)
|
2022-02-07 02:31:51 +05:30
|
|
|
rm -fr ./__pycache__
|