| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
a bucket, ignore the byte instead on the next go-round.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894423 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894420 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
brigades on boundaries of arbitrary length.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894380 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flags to make SCTP support reliable:
* build/apr_network.m4 (APR_CHECK_SCTP): Add --disable-sctp flag to
forcibly disable SCTP support, and --enable-sctp to fail configure
if is SCTP support is requested but not available.
Submitted by: Lubos Uhliarik <luhliari redhat.com>, jorton
Github: closes #28
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1894167 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Same lifetime as the hashtable used by apr_crypto_get_driver() to cache the
drivers for reloads.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893466 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
file_bucket_setaside().
apr_file_setasidea() needs to invalidate the old file descriptor per semantics:
* @remark After calling this function, old_file may not be used
So to avoid the setaside issue with splitted file buckets, file_bucket_setaside()
will now apr_file_dup() instead of apr_file_setaside() when the bucket is shared
(i.e. refcount > 1).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893445 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893275 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893274 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893271 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
apr_crypto_prng_create() relies on cprng_stream_ctx_make() to not set a
freed/dangling cprng->ctx on failure when given NULL.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893270 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
There is no cleanup with APR_FOPEN_NOCLEANUP, so apr_pool_cleanup_kill() can
go in the !(old_file->flags & APR_FOPEN_NOCLEANUP) block.
The file descriptor can't be invalidated either, the file may be split in
multiple buckets and setting aside one shouldn't invalidate the others.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893204 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Chacha is a stream cipher, not a block cipher in counter mode.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893203 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
To please memory leak analysers..
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893202 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can happen in cprng_stream_ctx_make() on error paths, or at thread exit
with APR_CRYPTO_PRNG_PER_THREAD like the below.
Direct leak of 64 byte(s) in 8 object(s) allocated from:
#0 0x7efd954c7628 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107628)
#1 0x7efd921db6ca (<unknown module>)
#2 0x7efd952937a2 in apr_crypto_prng_create crypto/apr_crypto_prng.c:367
#3 0x7efd95292c1e in apr_crypto_random_thread_bytes crypto/apr_crypto_prng.c:218
#4 0x5611dbbb9440 in thread_func /home/yle/src/apache/apr/trunk.ro/test/testcrypto.c:2597
#5 0x7efd9537dd86 in dummy_worker threadproc/unix/thread.c:148
#6 0x7efd951efea6 in start_thread nptl/pthread_create.c:477
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893201 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
cprng_thread_destroy() should destroy the given cprng first because
this might set cprng_global to NULL.
apr_crypto_prng_init() shouldn't delete cprng_thread_key on failure
unless APR_CRYPTO_PRNG_PER_THREAD is used.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893199 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
With musl libc, this fixes:
#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1893198 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
https://git.savannah.gnu.org/cgit/config.git.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1892754 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
apr_tables.c:832:10: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1892618 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Github: closes #27
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1892374 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
write() return value.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891310 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
error message on failure case.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891308 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
compiler warning.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891307 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
include/arch/unix/apr_arch_thread_mutex.h: Completely drop the code
required imitate the mutex via a condition variable if
HAVE_PTHREAD_MUTEX_TIMEDLOCK is defined.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891204 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
unlocking succeed.
Catch thread join errors and thread exit status throughout.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891203 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
allocator if node allocation fails, rather than leaking it.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891202 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891197 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1890980 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1890966 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
details of the driver selected and any error encountered. Add the
apr_dbm_open2() function that references the driver.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1890952 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
The usage of '$<' with BSD make results in an empty variable, therefore
compilation fails.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1890191 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
the empty string to ->Parse(), avoiding GCC 11 warning.
No functional change.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1889605 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
buffer lengths to match declaration, avoiding GCC 11 warning.
(no functional change)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1889604 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Ask each thread to signal its task completion individually when being waited in
wait_on_busy_threads(), and ignore threads that have already finished their
task (elt->current_owner == NULL).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1889217 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Change to .dat files instead (also in svn:ignore).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1888251 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
AC_LANG_PROGRAM generates an "int main()" prototype which some compilers warn
about. Restore AC_LANG_SOURCE to manually set the correct main() but do not
#include "confdefs.h" if it is inlined already by AC_LANG_SOURCE (i.e.
check whether PACKAGE_NAME is already defined).
Github: closes #25
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1888017 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
poffset is undefined there, by inspection (no BEOS at hand..).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887506 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887505 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
poffset is undefined there, by inspection (no BEOS at hand..).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887502 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
poffset is undefined there, by inspection (no BEOS at hand..).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887500 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Maybe there used to be 10 test/data/*.txt files, there are 3 only now.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887490 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887482 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gcc-10 raises:
tables/apr_skiplist.c: In function ‘apr_skiplist_add_index’:
tables/apr_skiplist.c:284:16: error: ‘ni’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
284 | nsln = apr_skiplist_insert(ni, m->data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
because above skiplisti_init() might return with ENOMEM, leaving ni uninitialized.
Since apr_skiplist_add_index returns void, the only option is to abort() in
this case.
For apr_skiplist_init(), we can forward the APR_ENOMEM to the caller.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887481 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The failure is observed on `autoconf-2.69d` (soon to be released
as `autoconf-2.70`). There `int64_t` detection fails as:
$ autoreconf && ./configure
checking whether int64_t and int use fmt %d... no
checking whether int64_t and long use fmt %ld... no
checking whether int64_t and long long use fmt %lld... no
configure: error: could not determine the string function for int64_t
```
This happens because `./configure` always stumbles on warning:
configure:3350: gcc -c -g -O2 -Werror conftest.c >&5
In file included from conftest.c:31:
confdefs.h:22: error: "__STDC_WANT_IEC_60559_ATTRIBS_EXT__" redefined [-Werror]
22 | #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
|
It's triggered by double inclusion of `"confdefs.h"` contents:
explicitly in `APR_TRY_COMPILE_NO_WARNING` macro and implicitly
via `AC_LANG_SOURCE` use.
To fix it and avoid having to define `main()` declaration the change
uses `AC_LANG_PROGRAM` instead.
Tested on both `autoconf-2.69` and `autoconf-2.69d`.
Github: closes #25
Submitted by: Sergei Trofimovich <slyfox gentoo.org>
Reviewed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887279 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
They are only used locally in apr_mmap_create().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887062 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is requirement for unix systems, and otherwise can cause failures or
undefined behaviour with some filesystems.
Add apr_mmap_t->poffset on unixes to track the offset to the previous page,
relative to the user requested/actual offset. This allows ->mm and ->size to
still point to the actual data, while munmap() still deletes the full range
from the start of the page.
Tests updated accordingly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1887060 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
test thread exit code.
(thread_func1): Exit if mutex lock/unlock fails.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1884544 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Detached threads are out of control and don't give the user a way to
synchronize when the program ends (or when the thread_pool is destroyed).
Rework the synchronization logic so that dead threads are always joined. This
is done by adding dead_thds ring and a join_dead_threads() function called from
several places: on termination when the thread_pool is destroyed, on resizing
with apr_thread_pool_{thread,idle}_max_set() when stopping off limits threads,
on maintenance when a task is added/cancelled.
Since join_dead_threads() waits for threads already dead (not the idle/busy
ones asked to die) the operation is not blocking indefinitely, so there is no
indefinite (nor much) overhead added to these places due to waiting for dead
threads.
The thread_pool_func() worker function is reworked to have a single point of
exit, and to always update the rings and counters accurately according to the
thread state, which allows for simpler maintenance and/or termination from the
other functions. The threads now put themselves into the (new) dead_thds ring
before exit, and the apr_thread_pool_{thread,idle}_max_set() functions don't
modify the idle or busy rings concurrently with the thread_pool_func() workers
anymore. They only ask the threads to stop and put themselves in dead_thds.
To join all the threads in thread_pool_cleanup(), cancel all the tasks and wait
for the busy threads handling them to die/idle (thanks to the new "work_done"
condition variable triggered by the thread after its task), then stop all the
remaining threads by calling apr_thread_pool_thread_max_set(0), and finally
wait for the last thread to exit (thanks to the new "all_done" condition var
triggered by the last thread exiting, replacing the spin wait).
So destroying the thread_pool (or a parent pool) may wait (indefinitely) for
all the active tasks to complete, which is the purpose of this commit: avoid
undefined behaviour in this case.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1884098 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A detached thread is by definition out of control, unjoinable, unmanaged,
and it can terminate/exit after its parent pool is detroyed.
To avoid use-after-free in this case, let's use an unmanaged pool for detached
threads, either by creating an unmanaged pool from the start if the thread
is created detached, or by "unmanaging" the pool if the thread is detached
later with apr_thread_detach().
To "umanage" the pool, provide a new internal helper, apr__pool_unmanage()
which takes care of removing the pool from its parent's list.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1884078 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Destroying a joinable thread pool from apr_thread_exit() or when the thread
function returns, i.e. from inside the thread itself, is racy or deadlocky
with APR_POOL_DEBUG, with the parent pool being destroyed.
This commit adds a ->detached flag in each arch's apr_thread_t struct to track
whether a thread is detached (either at _create() or _detach() time). If
detached, the pool is destroyed when the thread exits, otherwise when the
thread is joined with apr_thread_join().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1884077 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1883874 13f79535-47bb-0310-9956-ffa450edef68
|