45 Commits

Author SHA1 Message Date
Kazuho Oku
4da06c9dfb update code following API change 2021-12-27 14:44:03 +09:00
Hajime Fujita
17031c1d31 Allow register_proxy to take log file handle 2021-06-07 17:25:55 +00:00
Hajime Fujita
3deb919b6f [fuzzer] Extract common driver code
So that h3 fuzzer can reuse it later.
2021-06-04 21:19:50 +00:00
Kazuho Oku
f83353ff08
Merge pull request #2695 from h2o/hfujita/fuzzer-proxy-timeout
[fuzzer] Set proxy timeouts
2021-06-04 06:17:46 +09:00
Hajime Fujita
91affceb74 [fuzzer] Use timeout specified by envvar
H2O_FUZZER_CLIENT_TIMEOUT is read from environment but never used.
This patch actually uses it so the behavior matches what README says.
2021-05-28 21:24:05 +00:00
Hajime Fujita
1f3367ab21 Reduce proxy timeout to 100ms
Turns out there are many cases in corpora that would wait proxy
to timeout. Having a large value would explode the total runtime
of the fuzzer.
2021-05-19 20:45:47 +00:00
Hajime Fujita
1de6c31788 [fuzzer] Set proxy timeouts
`connect_timeout` and `first_byte_timeout` need to be explicitly
set to non-zero values.
This patch aligns these values with `io_timeout`, as done in
35401aeb71/lib/handler/configurator/proxy.c (L46)
2021-05-17 17:14:31 +00:00
Kazuho Oku
89951ea239 Merge branch 'master' into kazuho/timerwheel 2018-08-15 07:36:44 +09:00
Frederik Deweerdt
02a84204da fuzzer: fix init time race
This fixes a race between upstream_thread and sending a request.
It's possible that a request is injected via `created_accepted` before
the socket pair in `upstream_thread` is created.
If that request causes h2o to close the connection, and the socketpair
is created in the interm, it's possible that the socketpair gets the
same fd number as the closed request.
This means that the `is_valid_fd` test down the line doesn't fail,
resulting in a timeout.
2018-05-14 09:24:31 -07:00
Ichito Nagata
0d2486cf02 fix fuzz/driver.cc 2018-04-11 16:19:01 +09:00
Ichito Nagata
67a1034bcd use rather h2o_gettimeofday than h2o_get_timestamp for simplicity 2018-04-11 15:41:30 +09:00
Kazuho Oku
9983284521 fix fuzzer build error 2018-01-11 20:10:58 +09:00
Justin Zhu
2f8b515295 optimized code according to last review 2017-12-29 16:58:31 +08:00
Justin Zhu
ca72d787e1 make h2o_socketpool_target_conf_t as a super class 2017-12-10 10:50:11 +08:00
Justin Zhu
edce530ab5 mulitple tunes according to last reviews 2017-11-16 22:41:24 +08:00
Justin Zhu
0ccfee0535 fix fuzzer driver 2017-11-02 18:40:00 +08:00
Frederik Deweerdt
b235819d26 Remove h2o_timer_val 2017-10-27 13:53:45 -07:00
Frederik Deweerdt
7999ee8743 Renames h2o_timeout_timer -> h2o_timer, h2o_timeout -> h2o_timer_wheel 2017-10-27 11:25:29 -07:00
Justin Zhu
21ee22ac55 fix fuzzer. should be correct. 2017-10-27 16:25:38 +08:00
Justin Zhu
2537152afa fix fuzzer issue 2017-10-27 15:46:24 +08:00
Frederik Deweerdt
4180d252bb Merge remote-tracking branch 'upstream/master' into deweerdt/tw-upstream 2017-10-26 15:07:15 -07:00
Frederik Deweerdt
f5720ff89c - Fix libuv build
- Add h2o_timeout_val_t structure to differentiate set/unset
- Rename h2o_timerwheel_* to h2o_timeout_*
2017-10-26 11:57:39 -07:00
Justin Zhu
d8207d9908 Merge remote-tracking branch 'upstream/master' into lb-optimization 2017-10-26 23:43:13 +08:00
Kazuho Oku
7482e0216c fix build error in fuzzer 2017-10-26 22:28:41 +09:00
Justin Zhu
d8ff4c05d2 Merge remote-tracking branch 'upstream/master' into lb-optimization 2017-10-25 23:52:31 +08:00
Frederik Deweerdt
d768e9d345 Allow the fuzzer to build on MacOSX
Replace pthread_barrier_t with h2o_barrier_t, fix includes
2017-09-08 20:26:09 -07:00
Justin Zhu
47943a6b54 fix broken fuzzer driver due to new param appended to arg list 2017-09-06 10:27:15 +08:00
Jonathan Foote
e0d43fdd7c Move code out of asserts 2017-07-09 21:36:14 -04:00
Jonathan Foote
19648f2f19 bugfix: remove superfluous san/cov flags for fuzz builds. see https://github.com/google/oss-fuzz/issues/585 2017-05-12 16:18:17 -04:00
Kazuho Oku
7912487ed9 Merge pull request #1194 from deweerdt/proxy-preserve-original-header-casing
HTTP/1 proxying: preserve header cases
2017-02-23 06:58:33 +09:00
Frederik Deweerdt
e9942f8ce6 clang-format 2017-02-14 11:17:29 -08:00
Frederik Deweerdt
11ebb2f71e Pass orig_name directly to h2o_add_header* 2017-02-14 11:17:24 -08:00
Frederik Deweerdt
e55d249858 make tmpname static so that the storage doesn't go out of scope when
LLVMFuzzerTestOneInput returns.
2017-02-09 19:49:46 -08:00
Frederik Deweerdt
a95d140a8b make abort optional 2017-02-08 09:24:11 -08:00
Frederik Deweerdt
785b6c4202 Setup a proxy handler instead of the reproxy one
We can't actually pass a unix socket as an address in the reproxy header
currently, so let's register a proxy handler instead.
2017-02-08 09:24:11 -08:00
Frederik Deweerdt
02f9f55c8c Remove hardcoded www.ietf.org reproxy url, replace it by having the
fuzzer listen to a socket in a temp directory.
2017-01-31 13:48:06 -08:00
Frederik Deweerdt
12053c9989 Have a configurable event loop timeout for the client thread 2017-01-20 13:01:20 -08:00
Frederik Deweerdt
35599c4c14 Never exit the fuzzer until h2o ended up closing the fd internally. 2017-01-20 12:58:53 -08:00
Frederik Deweerdt
7000d3564a - Fix leak of the socket pair fd
- Add a 10s timeout for proxy IO
- Have epoll timeout every 10ms to inspect the fd sooner
2017-01-20 12:58:53 -08:00
Frederik Deweerdt
43b4e82457 Make sure we're done with the writer thread before returnig to the
fuzzer
2017-01-20 12:58:53 -08:00
Jonathan Foote
638518da79 make comments match new implementation 2017-01-20 12:58:53 -08:00
Frederik Deweerdt
126ce5d5fb Have a dedicated thread for read/writes to h2o
Instead of spawning a thread for each client request, instantiate one at
the start of the fuzzer, then feed the client via `job_queue`.
2017-01-20 12:58:53 -08:00
Jonathan Foote
d7b2a1ed8a clean up fuzz/README; fix typo 2017-01-20 12:58:53 -08:00
Jonathan Foote
4d6db9b55c add comments 2017-01-20 12:58:53 -08:00
Frederik Deweerdt
bcdaa46189 Add a fuzzer driver
This is activated when H2O is build with `cmake -DBUILD_FUZZER=ON`, it
also needs `clang` as compiler.
2017-01-20 12:58:52 -08:00