mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Revert "Add libfuzzer target to fuzz/x86_instruction_emulator"
This reverts commit af67ae49ce for
breaking the build with at least older gcc.
This commit is contained in:
1 parent
c674c77f69
commit
ff652ed5dc
3 files changed
+6
-22
No files matched your search
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
|
||||
|
||||
.PHONY: x86-insn-fuzz-all
|
||||
ifeq ($(CONFIG_X86_64),y)
|
||||
x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl libfuzzer
|
||||
x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl
|
||||
else
|
||||
x86-insn-fuzz-all:
|
||||
endif
|
||||
@@ -58,9 +58,6 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o
|
||||
afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o
|
||||
$(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@
|
||||
|
||||
libfuzzer-harness: $(OBJS) cpuid.o wrappers.o
|
||||
$(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@
|
||||
|
||||
# Common targets
|
||||
.PHONY: all
|
||||
all: x86-insn-fuzz-all
|
||||
@@ -70,8 +67,7 @@ distclean: clean
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov
|
||||
rm -f afl-harness afl-harness-cov libfuzzer-harness
|
||||
rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov
|
||||
rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c
|
||||
|
||||
.PHONY: install
|
||||
@@ -85,7 +81,4 @@ afl: afl-harness
|
||||
.PHONY: afl-cov
|
||||
afl-cov: afl-harness-cov
|
||||
|
||||
.PHONY: libfuzzer
|
||||
libfuzzer: libfuzzer-harness
|
||||
|
||||
-include $(DEPS_INCLUDE)
|
||||
@@ -906,12 +906,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size)
|
||||
|
||||
if ( size <= DATA_OFFSET )
|
||||
{
|
||||
return -1;
|
||||
printf("Input too small\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( size > FUZZ_CORPUS_SIZE )
|
||||
{
|
||||
return -1;
|
||||
printf("Input too large\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
memcpy(&input, data_p, size);
|
||||
|
||||
@@ -91,17 +91,6 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg)
|
||||
{
|
||||
int rc;
|
||||
|
||||
emul_save_fpu_state();
|
||||
rc = __real_vsnprintf(buf, n, fmt, varg);
|
||||
emul_restore_fpu_state();
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
char *__wrap_strstr(const char *s1, const char *s2)
|
||||
{
|
||||
char *s;
|
||||
|
||||