| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909719 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909677 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909590 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909586 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
them if they are not usable any longer.
* memcache/apr_memcache.c::ms_find_conn:
Check if the socket returned from the connection pool is still readable. If
not then invalidate the connection in the pool and request a new one
from the connection pool. Repeat this until a valid socket is returned
or this was done the maximum number of connections in the pool plus one.
This ensures that at least one new socket was created. If a new socket
does not work this indicates a broken backend and not just a restart in
the past. In this case return an error like previously.
* test/testmemcache.c:
Add new test for connection validation.
* test/memcachedmock.c:
For the new test we need a memcached mock server that we control and
can restart.
* test/testmemcache.h:
Shared defines between test/testmemcache.c and test/memcachedmock.c.
* test/Makefile.in:
* test/Makefile.win:
* test/NWGNUmakefile:
* test/NWGNUmemcachedmock:
Needed changes to build test/memcachedmock.c on different platforms.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909585 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_memcache_server_t struct for later usage.
* include/apr_memcache.h::struct apr_memcache_server_t:
Add missing fields to struct.
* memcache/apr_memcache.c::apr_memcache_server_create:
Init fields with given values.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909474 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909324 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909323 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Regardless of --enable-nonportable-atomics setting, 64bit atomic builtins are
disabled for 32bit CPUs/systems (using the generic/mutex implementation), until
we figure out how to properly align apr_uint64_t (at least i[56]86 CPUs which
could work with 64bit builtins actually don't if the data is not 64bit aligned,
assuming the same for other 32bit CPUs is safer).
One can --enable-nonportable-atomics=upto32bit to explicitely enable 32 bit
builtins only (if available in the first place).
Using --enable-nonportable-atomics=no still disables both 64bit and 32bit
builtins, while =yes enables the ones known to exist AND work only (i.e. both,
32bit or none).
Rename NEED_ATOMICS_GENERIC64 to USE_ATOMICS_GENERIC64 for consitency with
32bit atomics.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909321 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909310 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per Evgeny:
"""
1) The debug implementation of an assert() may print a diagnostic message,
for example to stderr. A caller of the library function may not be ready for
this to happen when using a non-debug version of the library.
2) The actual destination of the message seems to be implementation-defined.
For example, in Windows-based applications this may show a message box [1],
which is probably even more unexpected for the user of the library.
3) Undefining NDEBUG before other headers may silently cause unexpected
effects if any of those headers make some decisions based on the NDEBUG value,
which isn't an entirely unreasonable thing to expect.
"""
We want to always fault on failure though, so define and use our own
APR__ASSERT() macro which calls abort() directly when NDEBUG is defined.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909117 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909091 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909090 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
was causing the content to be written at offset 0, rather than appended
(see r1909088).
* test/testfile.c
(test_append_buffered): New test.
(testfile): Run the new test.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909089 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APR_FOPEN_APPEND).
While this change fixed an issue where Windows and Unix reported different
offsets after opening files for append, it also caused a regression: for
files opened with APR_FOPEN_APPEND | APR_FOPEN_BUFFERED, flushing their
contents would cause the contents to be written at offset 0, rather than
appended.
This happens because flushes and regular writes use different code paths.
And while regular writes guarantee that an append will happen to the end of
the file, a buffer flush uses a regular WriteFile(), assuming the file pointer
has been properly set before.
To fix both issues, we'd probably need to rework this part and make all
writes use the same approach. But for now let's revert this change to fix
the regression, that was also reported in [1].
I'll add a regression test for this problem separately.
[1] https://lists.apache.org/thread/56gnyc3tc0orjh5mfsqo9gpq1br59b01
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1909088 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908887 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908749 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908618 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.in:
Small epoll_wait() loop to check timeout reliability and set
HAVE_EPOLL_WAIT_RELIABLE_TIMEOUT.
* test/testpoll.c(justsleep):
Allow some jiffy is !HAVE_EPOLL_WAIT_RELIABLE_TIMEOUT.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908616 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908592 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908588 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908503 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908501 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908455 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
The crypto_*_init() functions can be called multiple times with the returned
structure already allocated/initialized, or not. So rather than cleaning up
after each operation (which was removed in r1908433 but is now leaky), let's
instead either allocate+register or cleanup existing structure in _init().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908453 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908448 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908438 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908437 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908436 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908435 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908434 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908433 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
w/o APR_HAS_THREAD_LOCAL.
It's useless when !APR_HAS_THREAD_LOCAL since apr_thread_current() can't work.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908417 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908336 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since r1872148 apr-1-config tries to detect if it runs in a crosscompile
scenario. Fix the detection to correctly distinguish between crosscompiling
and DESTDIR installations for packaging.
* configure.in: Set APR_CROSS_COMPILING to 'no', 'yes' or 'maybe' based on
possible --host and --build parameters given to configure to determine
if configure was called for a crosscompiling scenario. This was inspired
by how autoconf itself detects crosscompiling scenarios.
* apr-config.in: Use the value from APR_CROSS_COMPILING to determine if
we are in a crosscompiling scenario. Furthermore normalize the pathes
we use for suffix matches by collapsing multiple consecutive '/' to one.
PR: 66510
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908248 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1908170 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907988 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907987 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
[Reverted by r1907987]
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907986 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907985 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Remove it to save 8 bytes (on 64 bits arch) when such a struct is allocated.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907751 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On x86_64, this shrinks the size of the struct from 120 to 112 bytes.
Before the patch, pahole states that:
struct apr_finfo_t {
apr_pool_t * pool; /* 0 8 */
apr_int32_t valid; /* 8 4 */
apr_fileperms_t protection; /* 12 4 */
apr_filetype_e filetype; /* 16 4 */
apr_uid_t user; /* 20 4 */
apr_gid_t group; /* 24 4 */
/* XXX 4 bytes hole, try to pack */
apr_ino_t inode; /* 32 8 */
apr_dev_t device; /* 40 8 */
apr_int32_t nlink; /* 48 4 */
/* XXX 4 bytes hole, try to pack */
apr_off_t size; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
apr_off_t csize; /* 64 8 */
apr_time_t atime; /* 72 8 */
apr_time_t mtime; /* 80 8 */
apr_time_t ctime; /* 88 8 */
const char * fname; /* 96 8 */
const char * name; /* 104 8 */
struct apr_file_t * filehand; /* 112 8 */
/* size: 120, cachelines: 2, members: 17 */
/* sum members: 112, holes: 2, sum holes: 8 */
/* last cacheline: 56 bytes */
};
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907750 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907718 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't play games with sizeof(void*) to determine whether a raw load
intruction is atomic or not. Systems that fall back to the generic
implementation are not eligible for the compiler builtins or CPU
native atomic intructions already, and we don't want to reimplement
that here (e.g. alignment, ordering guarantees, ...).
* atomic/unix/mutex64.c(apr_atomic_read64):
No #ifdefery, always take the lock.
Follow up to r1907541.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907678 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Just in case the test is later reordered (e.g. test_atomics_threaded64
and test_atomics_threaded_setread64 use the same atomic_ops64 variable).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907677 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some systems the __atomic builtins may be available only through libatomic
or fall back to libatomic when the atomic operations are not issued on a
suitably aligned address (64bit atomics on 8-byte aligned addresses only for
instance).
Modify the tests for HAVE_ATOMIC_BUILTINS64 and HAVE__ATOMIC_BUILTINS64 such
that the address for the atomic operations is not aligned (unless 64bit ints
always have the suitable alignment, i.e. mainly 64bit systems..).
Also, use the __atomic_always_lock_free() builtin to fail the test when the
compiler already knows about the alignment issue (falling back to libatomic,
which we don't require/want).
With this, 64bit builtins should be selected only for platforms that can
natively handle atomics on any apr_uin64_t (since the APR has no dedicated
8-byte aligned 64bit type for now), while the generic/mutex implementation
is used for others.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907642 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
s390x.
Raw 64 bit load and store need two intructions on 32bit systems (tearing) so
they are not atomic, and only x86(_64) and s390(x) have stong mempry ordering
guarantees. Always use builtin functions for the cases where raw load/store
don't work as expected.
* atomic/unix/builtins.c, atomic/unix/builtins64.c:
Use an accept-list rather than a reject-list to define WEAK_MEMORY_ORDERING.
Test APR_SIZEOF_VOIDP < 8 to force usage of __sync builtins for _read{32,64}
and _set{32,64} on 32bit systems when __atomic_{load,store} buitlins are not
available.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907637 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
padding.
Before the patch, pahole states that:
struct apr_bucket_file {
apr_bucket_refcount refcount; /* 0 4 */
/* XXX 4 bytes hole, try to pack */
apr_file_t * fd; /* 8 8 */
apr_pool_t * readpool; /* 16 8 */
int can_mmap; /* 24 4 */
/* XXX 4 bytes hole, try to pack */
apr_size_t read_size; /* 32 8 */
/* size: 40, cachelines: 1, members: 5 */
/* sum members: 32, holes: 2, sum holes: 8 */
/* last cacheline: 40 bytes */
};
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907634 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Add an option to revert this choice on systems that provide both.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907566 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(tearing).
A 64bit load on a 32 bit CPU/system uses two instructions (tearing), so ensure
atomicity with regard to other atomic functions by using the (same) lock.
test_atomics_threaded64() fails because of this on 32bit systems. PR 66457.
* atomic/unix/mutex64.c(apr_atomic_read64):
Use locking when APR_SIZEOF_VOIDP < 8
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1907541 13f79535-47bb-0310-9956-ffa450edef68
|