Add windows test & ci & fix (#2144)

* fix

* ignore

* fmt

* a
This commit is contained in:
Dongjia "toka" Zhang 2024-05-05 14:53:27 +02:00 committed by GitHub
parent 502929d967
commit d4ff7b86b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 3 deletions

View File

@ -334,7 +334,7 @@ jobs:
- ./fuzzers/fuzzbench - ./fuzzers/fuzzbench
- ./fuzzers/libfuzzer_stb_image - ./fuzzers/libfuzzer_stb_image
- ./fuzzers/fuzzbench_forkserver - ./fuzzers/fuzzbench_forkserver
- ./fuzzers/libfuzzer_windows_asan # - ./fuzzers/libfuzzer_windows_asan
- ./fuzzers/baby_fuzzer_minimizing - ./fuzzers/baby_fuzzer_minimizing
# - ./fuzzers/qemu_coverage # - ./fuzzers/qemu_coverage
- ./fuzzers/frida_executable_libpng - ./fuzzers/frida_executable_libpng

View File

@ -81,6 +81,11 @@ windows_alias = "test_windows" # TODO
[tasks.test_windows] [tasks.test_windows]
script_runner = "@shell" script_runner = "@shell"
script=''' script='''
start "" "${FUZZER_NAME}.exe"
start "" "${FUZZER_NAME}.exe"
#ping is for timeout
ping -n 10 127.0.0.1>NUL && taskkill /im ${FUZZER_NAME}.exe /F
>nul 2>nul dir /a-d "crashes\*" && (echo Files exist) || (exit /b 1337)
''' '''
dependencies = [ "fuzzer" ] dependencies = [ "fuzzer" ]

View File

@ -11,6 +11,6 @@ void asan_crash() {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
// abort(); // abort();
asan_crash(); if (size == 10) { asan_crash(); }
return 0; return 0;
} }

View File

@ -435,7 +435,7 @@ struct HandlerHolder {
handler: UnsafeCell<*mut dyn Handler>, handler: UnsafeCell<*mut dyn Handler>,
} }
pub const EXCEPTION_HANDLERS_SIZE: usize = 64; pub const EXCEPTION_HANDLERS_SIZE: usize = 96;
unsafe impl Send for HandlerHolder {} unsafe impl Send for HandlerHolder {}
@ -445,6 +445,8 @@ static mut EXCEPTION_HANDLERS: [Option<HandlerHolder>; EXCEPTION_HANDLERS_SIZE]
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
]; ];
unsafe fn internal_handle_exception( unsafe fn internal_handle_exception(