| a03f0f8a | 05-Jul-2020 |
Azat Khuzhin <[email protected]> |
test: fix leak in dns/getaddrinfo_cancel_stress
Some requests may get response (evutil_addrinfo) from gaic_server_cb, in case of cancel_event (10000ms) will not be fast enough.
(cherry picked from
test: fix leak in dns/getaddrinfo_cancel_stress
Some requests may get response (evutil_addrinfo) from gaic_server_cb, in case of cancel_event (10000ms) will not be fast enough.
(cherry picked from commit 90bcf2d660b9b43cb8e747421d4938f08f935bd7)
show more ...
|
| 777cc2b6 | 05-Jul-2020 |
Azat Khuzhin <[email protected]> |
test: fix UB in evbuffer/empty_reference_prepend_buffer
UBSAN reports: test/regress_buffer.c:2360:2: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/inc
test: fix UB in evbuffer/empty_reference_prepend_buffer
UBSAN reports: test/regress_buffer.c:2360:2: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/string.h:140:33: note: nonnull attribute specified here
(cherry picked from commit ba19b356bf8a9be2a5bddfa264dee61ffc9573a7)
show more ...
|
| 82ae28e1 | 05-Jul-2020 |
Azat Khuzhin <[email protected]> |
test: really disable bufferevent_pair_release_lock under ASAN (and fix gcc)
(cherry picked from commit 7b9ba3b717af109abdf3fb5fc99c288dc8024ef5) |
| ff67e8c2 | 05-Jul-2020 |
Azat Khuzhin <[email protected]> |
test-closed: fix leak
(cherry picked from commit e2f938c04f9a72f6fd6ca9b7a8219ca9cb409d69) |
| 4d3ff29c | 26-Jun-2020 |
Azat Khuzhin <[email protected]> |
test: add getaddrinfo(AI_ADDRCONFIG) test (off by default)
(cherry picked from commit 0ac3cfc0b70edc2cfb429712d6aaf1b3a63d2d1a) |
| ccd67243 | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
test: fix memory leaks for https (add BEV_OPT_CLOSE_ON_FREE)
- http/https_filter_basic - http/https_filter_chunk_out
(cherry picked from commit ec94a6bb3f9d950101d07b2a2e092b675d5aa3f0) |
| 3c2c856d | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
test: "fix" (with a quirk) leak in ssl/bufferevent_wm (w/o defer callbacks)
(cherry picked from commit cdbb2373f4d13f7a5eb69daaf0a172779ccc0040) |
| 66341e84 | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky)
And cannot be suppressed with suppressions due to setup routines.
(cherry picked from commit 3b13a64789b3942608f04c31
test: disable bufferevent/bufferevent_pair_release_lock under ASAN (too tricky)
And cannot be suppressed with suppressions due to setup routines.
(cherry picked from commit 3b13a64789b3942608f04c31455668bebe224a40)
show more ...
|
| 19a68bd1 | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
test: detect test failures if atexit handler calls _exit(!0) (sanitizers)
tinytest uses another way of detecting test failures, it uses pipe between child and parent, and if the test function in chi
test: detect test failures if atexit handler calls _exit(!0) (sanitizers)
tinytest uses another way of detecting test failures, it uses pipe between child and parent, and if the test function in child returns OK it writes OK flag into pipe, and reads it in parent.
However sanitizers uses atexit handlers to detect leaks, and this will not detect failures in case of exit() will be called from the atexit handlers, fix this by checking status after waitpid().
(cherry picked from commit 6754740f15e8200a12605a2e707fc6d3e6754d6a)
show more ...
|
| 5b063049 | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
buffer: do not pass NULL to memcpy() from evbuffer_pullup()
UBSAN reports:
evbuffer/remove_buffer_with_empty3: ../buffer.c:1443:3: runtime error: null pointer passed as argument 2, which is decla
buffer: do not pass NULL to memcpy() from evbuffer_pullup()
UBSAN reports:
evbuffer/remove_buffer_with_empty3: ../buffer.c:1443:3: runtime error: null pointer passed as argument 2, which is declared to never be null #0 0x7ffff6cd0410 in evbuffer_pullup ../buffer.c:1443 #1 0x5555556d68b9 in test_evbuffer_remove_buffer_with_empty3 ../test/regress_buffer.c:408 #2 0x5555557b95ee in testcase_run_bare_ ../test/tinytest.c:173 #3 0x5555557ba048 in testcase_run_one ../test/tinytest.c:333 #4 0x5555557bc0f8 in tinytest_main ../test/tinytest.c:527 #5 0x555555787702 in main ../test/regress_main.c:528 #6 0x7ffff606c001 in __libc_start_main (/usr/lib/libc.so.6+0x27001) #7 0x55555569436d in _start (/src/le/libevent/.cmake-debug/bin/regress+0x14036d)
(cherry picked from commit a0c642ac04487d8cda809bd6e233b0fbd043806d)
show more ...
|
| a91abd0e | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
test: do not pass NULL to memcmp() in evbuffer_datacmp() helper
Fixes: runtime error: null pointer passed as argument 2, which is declared to never be null (cherry picked from commit 6f152befb4523
test: do not pass NULL to memcmp() in evbuffer_datacmp() helper
Fixes: runtime error: null pointer passed as argument 2, which is declared to never be null (cherry picked from commit 6f152befb4523fd2e57c1a937e590f8ff87b7f15)
show more ...
|
| 6b8d02a7 | 25-Jun-2020 |
Azat Khuzhin <[email protected]> |
http: fix undefined-shift in EVUTIL_IS*_ helpers
evutil.c:2559:1: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' #0 0x4f2be0 in EVUTIL_ISXDIGIT_ libevent/evutil.
http: fix undefined-shift in EVUTIL_IS*_ helpers
evutil.c:2559:1: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' #0 0x4f2be0 in EVUTIL_ISXDIGIT_ libevent/evutil.c:2559:1 #1 0x4bd689 in regname_ok libevent/http.c:4838:7 #2 0x4bc16b in parse_authority libevent/http.c:4958:9 #3 0x4bb8b5 in evhttp_uri_parse_with_flags libevent/http.c:5103:7 #4 0x4bb762 in evhttp_uri_parse libevent/http.c:5050:9 #5 0x4b8f41 in evhttp_parse_query_impl libevent/http.c:3505:9 #6 0x4b8ed7 in evhttp_parse_query libevent/http.c:3569:9
Bug: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23291 Report: https://oss-fuzz.com/testcase-detail/5670743106125824 (cherry picked from commit 37dbb3508099d49748453166c1ee9ef1603fcf3a)
show more ...
|
| fb5fa12a | 02-Jun-2020 |
Azat Khuzhin <[email protected]> |
test/regress_testutils: use inet_addr()
(cherry picked from commit 8b5a4d61f6eb7180c0800f38549c20776c6d1cd9) |
| 65a002a8 | 24-May-2020 |
Azat Khuzhin <[email protected]> |
test: http/autofree_connection cleanup
(cherry picked from commit e8c8951029a0a084dd73b27e6dc3b637a7c914db) |
| 8dc6468e | 18-May-2020 |
Azat Khuzhin <[email protected]> |
test: cleanup http/autofree_connection
(cherry picked from commit 70f69194eb3b19b5e41b52b17a820e1e91512560) |
| ab130875 | 18-May-2020 |
Azat Khuzhin <[email protected]> |
test: fix http/autofree_connection
Refs: #182 (cherry picked from commit 1cc94feab81e7387041edc32be9843f66847072d) |
| c2972453 | 18-May-2020 |
ayuseleznev <[email protected]> |
evdns: Add additional validation for values of dns options
(cherry picked from commit 8fe35c7614802fa13d144cceea9b079d5a131891) |
| 141e37c8 | 08-May-2020 |
Nick Grifka <[email protected]> |
test: Fix test_simpleclose for Windows platform
Replace close with evutil_closesocket Caught with PR #1006
(cherry picked from commit 06a11929511bebaaf40c52aaf91de397b1782ba2) |
| 1df324d4 | 04-May-2020 |
Azat Khuzhin <[email protected]> |
Fix EV_CLOSED detection/reporting (epoll only)
- EV_CLOSED is EPOLLRDHUP in epoll - EPOLLRDHUP reported w/o EPOLLHUP if the socket closed with shutdown(SHUT_WR) - EPOLLRDHUP reported w/ EPOLLHUP if
Fix EV_CLOSED detection/reporting (epoll only)
- EV_CLOSED is EPOLLRDHUP in epoll - EPOLLRDHUP reported w/o EPOLLHUP if the socket closed with shutdown(SHUT_WR) - EPOLLRDHUP reported w/ EPOLLHUP if the socket closed with close() so in this case epoll backend will detect this event as error (EV_READ|EV_WRITE), since the epoll_ctl() will return EPOLLRDHUP with EPOLLHUP set, but this is not correct, let's fix this.
Fixes: #984 (cherry picked from commit 972b456bf60e9a2f550ec45a14921c06e252c793)
show more ...
|
| db2efdf5 | 04-May-2020 |
Azat Khuzhin <[email protected]> |
Merge branch 'EV_CLOSED-and-EV_ET-fixes'
* EV_CLOSED-and-EV_ET-fixes: Avoid triggering wrong events with EV_ET set epoll: handle EV_ET for EV_CLOSED too test: cover EV_CLOSED with lots of poss
Merge branch 'EV_CLOSED-and-EV_ET-fixes'
* EV_CLOSED-and-EV_ET-fixes: Avoid triggering wrong events with EV_ET set epoll: handle EV_ET for EV_CLOSED too test: cover EV_CLOSED with lots of possible scenarious test: rename simpleclose to simpleclose_rw (since it works via write/read)
(cherry picked from commit c10cde4c617979e951352775a9685a47bf9c6acd)
show more ...
|
| 1fce771d | 16-Apr-2020 |
Nick Grifka <[email protected]> |
bench: Allow backend method selection
-l list available methods -m <name> use method
(cherry picked from commit 5caffa7a5b3ce67e074e2ee99fc553c1cac0712c) |
| e41a1969 | 01-Mar-2020 |
Azat Khuzhin <[email protected]> |
test-time: do not use deprecated API
- event_init() -> event_base_new() - event_set() -> event_new() - check return value of event_base_dispatch() - use EXIT_SUCCESS/EXIT_FAILURE
(cherry picked fro
test-time: do not use deprecated API
- event_init() -> event_base_new() - event_set() -> event_new() - check return value of event_base_dispatch() - use EXIT_SUCCESS/EXIT_FAILURE
(cherry picked from commit 4e5a41ca0f668da1a18832e5cb02b4afeae074ff)
show more ...
|
| 29e2c7f2 | 01-Mar-2020 |
Azat Khuzhin <[email protected]> |
test-time: enable debug mode if EVENT_DEBUG_LOGGING_ALL env set
(cherry picked from commit a11edbfa369f7a99886359b3f4baa69686dc275f) |
| 6f8e0e97 | 27-Feb-2020 |
ayuseleznev <[email protected]> |
evdns: fix a crash when evdns_base with waiting requests is freed
Fix undefined behaviour and application crash that might take place in some rare cases after calling evdns_base_free when there are
evdns: fix a crash when evdns_base with waiting requests is freed
Fix undefined behaviour and application crash that might take place in some rare cases after calling evdns_base_free when there are requests in the waiting queue.
Current cleanup procedure in evdns_base_free_and_unlock function includes 2 steps: 1. Finish all inflight requests. 2. Finish all waiting requests. During the first step we iterate over each list in req_heads structure and finish all requests in these lists. With current logic finishing an inflight request (function request_finished) removes it from the inflight requests container and forces a wating connection to be sent (by calling evdns_requests_pump_waiting_queue). When these new requests are sent it is possible that they will be inserted to the list in req_heads that we've already cleaned. So in some cases container of the inflight requests is not empty after this procedure and some requests are not finished and deleted. When timeouts for these requests expire evdns_request_timeout_callback is called but corresponding evdns_base has been already deleted which causes undefined behaviour and possible applicaton crash.
It is interesting to note that in old versions of libevent such situation was not possible. This bug was introduced by the commit 14f84bbdc77d90b1d936076661443cdbf516c593. Before this commit nameservers were deleted before finishing the requests. Therefore it was not possible that requests from the waiting queue be sent while we finish the inflight requests.
(cherry picked from commit 4da9f87ccbe71edb3b3aaf74b8b64d7e9c41dcaf)
show more ...
|
| 9e993c3c | 11-Feb-2020 |
yuangongji <[email protected]> |
test-ratelim: add missing free
(cherry picked from commit 5fbe6313ae7e81cde3e056b29171a6346c54aa0b) |