Skip to content

Conversation

azat
Copy link
Member

@azat azat commented May 14, 2023

Previously in case when evbuffer_reserve_space() returns > 1, but
it was able to read only 1 IO vector, it will try to read the next one,
got 0 (EOF for mbedTLS or SSL_ERROR_ZERO_RETURN for OpenSSL) and will
trigger EOF, while instead, it should trigger EV_READ w/o EOF and only
after EOF.

azat added 2 commits May 14, 2023 16:49
Previously in case when evbuffer_reserve_space() returns > 1, but
it was able to read only 1 IO vector, it will try to read the next one,
got 0 (EOF for mbedTLS or SSL_ERROR_ZERO_RETURN for OpenSSL) and will
trigger EOF, while instead, it should trigger EV_READ w/o EOF and only
after EOF.
@azat
Copy link
Member Author

azat commented May 14, 2023

build / freebsd-cmake-job (12.3, DISABLE_MM_REPLACEMENT) (pull_request) Failing after 68m

Issues with internal malloc (AFAIR freebsd uses jemalloc) likely

  FAIL /Users/runner/work/libevent/libevent/test/regress_util.c:1338: assert(p == NULL)1/416 TESTS FAILED. (51 skipped)

Likely unrelated:

  FAIL /Users/runner/work/libevent/libevent/test/regress_util.c:1338: assert(p == NULL)[warn] BUG: Unexpected mbedtls error code -80: NET - Connection was reset by peer

@azat
Copy link
Member Author

azat commented May 14, 2023

Issues with internal malloc (AFAIR freebsd uses jemalloc) likely

I've checked calloc(SIZE_MAX, SIZE_MAX) with jemalloc and it does returns NULL, at least my version of it.

@azat azat merged commit e8cbe7b into libevent:master May 14, 2023
@azat azat deleted the ssl/fix-partial-read branch May 14, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant