| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
*) apr_file_read: Optimize large reads from buffered files on Windows.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902379 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
*) apr_file_write: Optimize large writes to buffered files on
Windows.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902378 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Win32: Don't seek to the end when opening files with APR_FOPEN_APPEND.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902377 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Win32: Fix a deadlock when appending to locked files (PR50058).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902376 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
*) apr_file_gets: Optimize for buffered files on Windows.
[Evgeny Kotkov <evgeny.kotkov visualsvn.com>]
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902375 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The API of atomic_{cas,xchg}ptr() is broken, using "volatile void **" instead
of "void *volatile *" to qualify the exchanged pointer address. This does not
prevent the compiler from caching *mem into a local variable, which would break
atomicity.
Since the API of existing functions cannot change in 1.x, provide two new
apr_atomic_casptr2() and apr_atomic_xchgptr2() with the right API. Add a dox
@warning to notify users to switch to using the new functions.
The implementation is not duplicated by using common (APR_INLINE) helpers.
Relates to: r1763666 in trunk.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902268 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Somehow one of the "return NULL" was already in 1.8.x, don't double it.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902254 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added support for recording skipped test cases.
testfile: silence -Wstring-plus-int warnings.
Merge r1877439, r1877441, r1877442 from trunk.
Submitted by: brane
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902230 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testmutexscope.c(test_mech_mode, eachThread):
Cast to apr_uintptr_t first before converting pointer to/from enum.
Merge r1902182 from trunk.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902229 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testfile.c(test_datasync_on_stream):
Let ABTS_INT_EQUAL show the actual errno.
test/testfile.c: apr_file_datasync() fails with ENOTSUP for streams on macos.
* test/testfile.c(test_datasync_on_stream):
Handle ENOTSUP on macos.
Merge r1902175, r1902180 from trunk.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902228 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testskiplist.c
(skiplist_get_size): Return size_t instead of int.
* test/testskiplist.c: Use ABTS_SIZE_EQUAL() where it makes sense.
Merge r1902154, r1902155 from trunk.
Submitted by: ivan
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902225 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
* test/sockperf.c: Use apr_size_t instead of int.
Merge r1902157 from trunk.
Submitted by: ivan
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902224 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Merge r1866712 from trunk.
Submitted by: ivan
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902223 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
By using the right numeric comparison assertions and some explicit casts.
Merge r1902205 from trunk (only the testmmap parts, apr-util ones ignored).
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902222 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testatomic.c():
Use ABTS_UINT_EQUAL() to compare apr_uint32_t atomics, and
ABTS_ULLONG_EQUAL() for apr_uint64_t ones.
testatomic: Follow up to r1902199: More numeric types assertions.
* test/testatomic.c(busyloop_dec32):
Use ABTS_UINT_EQUAL().
* test/testatomic.c(busyloop_dec64):
Use ABTS_ULLONG_EQUAL().
Merge r1902199, r1902204 from trunk.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902221 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/abts.h():
Declare abts_{uint,long,ulong,llong,ullong}_{n,}equal() and the corresponding
ABTS_{UINT,LONG,ULONG,LLONG,ULLONG}_{N,}EQUAL() wrappers.
* test/abts.c():
Implement abts_{uint,long,ulong,llong,ullong}_{n,}equal() using a common macro.
test/abts: Follow up to r1902191: Fix IMPL_abts_T_nequal.
* test/abts.c(IMPL_abts_T_nequal):
Invert logic from IMPL_abts_T_equal (bad copypasta)
Merge r1902191, r1902192 from trunk.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902220 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testlock.c(thread_mutex_function,
thread_mutex_sleep_function):
Thread (APR_THREAD_FUNC) functions should return a pointer (NULL).
Merge r1902181 from trunk.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902219 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
test_datasync_on_stream tests.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902145 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
Add test for WAIT_ABANDONED handling for win32 mutexes.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902122 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
r1770471: Add test for apr_file_open(APR_FOPEN_APPEND).
r1770489: Follow-up to r1770471: resolve two compiler warnings in
testfile.c.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902120 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Add simple tests for nested and unnested thread mutexes.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902119 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902116 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1902091 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix various harmless cases of undefined behaviour, and add a Travis
job testing under UBSan.
* poll/unix/poll.c (apr_poll): For the on-stack array allocation use
num+1 since allocating a 0-length array is undefined behaviour.
* tables/apr_skiplist.c (get_b_rand): Use unsigned integers to avoid
signed integer overflow in the left shift.
(skiplist_qpush): Avoid calling memcpy(,NULL,0).
* random/unix/apr_random.c (apr_random_add_entropy): Avoid calling
memcpy(,NULL,0).
* test/teststr.c (overflow_strfsize): Avoid signed integer overflow.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.8.x@1898099 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
test: fix memory leaks of the test framework at exit.
To please memory leak analysers..
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1897005 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testatomic: Fix gcc-11 warnings.
Not sure why it wants the "a" local variable to point to something since
we only use its pointer, but that's how it is.. While at it let's initialize
"b" too.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1896962 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
testatomic: Silence -Wmissing-prototypes warning.
Submitted by: brane
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1896728 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* test/proc_child.c (main): Avoid gcc -Wunused-result warning with
write() return value.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1896718 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_atomic_read64(): Fix non-atomic read on 32-bit Windows.
* atomic/win32/apr_atomic64.c
(apr_atomic_read64): Use InterlockedCompareExchange64() instead of direct
memory read.
* test/testatomic.c
(test_atomics_threaded_setread64): New test.
(test_func_set64): Helepr for test_atomics_threaded_setread64 test.
* CHANGES: Add changelog entry.
* atomic/win32/apr_atomic64.c
(apr_atomic_read64): Use direct memory read when compiled for x86_x64, since
64-bit reads are atomic in 64-bit Windows [1].
Suggested by: Yann Ylavic
[1] https://docs.microsoft.com/en-us/windows/win32/sync/interlocked-variable-access
Submitted by: ivan
Reviewed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1896068 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* memory/unix/apr_pools.c (apr_pvsprintf): Fix a clang warning, the
'active' variable is never read/used before being set again to
pool->active on line 1436.
* file_io/unix/readwrite.c (apr_file_write, apr_file_writev): Fix
Coverity warnings from ignored lseek() return value in ->buffered
handling.
* test/teststr.c: Add trivial testcases for apr_pstrcat (though this
does not reproduce any problems from the bug).
Revert non-test part of r1878354, the Coverity warning was a
false -ve and there was no functional change nor bug.
* locks/unix/proc_mutex.c (apr_proc_mutex_defname): Fix clang warning,
remove unused local variable.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1891196 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testfnmatch: fix number of expected test/data/*.txt files.
Maybe there used to be 10 test/data/*.txt files, there are 3 only now.
testfile: don't generate .txt files since it distorts testfnmatch results.
Change to .dat files instead (also in svn:ignore).
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1888252 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
fdatasync() might return EINVAL for special files (i.e. terminal).
This is the case on latest Linux for instance, like 5.9.
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1887498 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Align apr_mmap()ing offset to a page boundary. PR 65158.
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() now deletes the full range
from the start of the page.
Tests updated accordingly.
* Changes between r1887060 and this 1.7.x backport
Since the layout of struct apr_mmap_t cannot change (non opaque), the poffset
is over-allocated in mmap/unix/mmap.cmmap.c which uses this layout internally:
struct mm_layout {
apr_mmap_t mm;
apr_off_t poffset;
};
This works for all the apr_mmap_t created by apr_mmap_create() with which any
apr_mmap_*() function can then be called.
If a user creates an apr_mmap_t "by hand", with this change it cannot be passed
to apr_mmap_dup() without causing an out-of-bound read. This is hardly a new
limitation though, the refcounting which is the point of apr_mmap_dup() and
apr_mmap_delete() comes from the private function mmap_cleanup() anyway, so
there is no point in using these two functions with hand made apr_mmap_t (if
there ever was a point in the first place to create an hand made apr_mmap_t..).
Submitted by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1887497 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
apr_decode_base{64,32,16}: stop reading before (not including) NUL byte.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883880 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Follow up to r1790200: fall back to fsync() if F_FULLFSYNC is not supported
by the file descriptor, filesystem or underlying device.
See, e.g.: https://github.com/vim/vim/pull/4025
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883341 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Add --tag=CC to libtool invocations. PR 62640. [Michael Osipov]
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1865793 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
testencode: fix compilation on VS.
testencode: better fix compilation on VS.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1856271 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1856249 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1855868 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Add in Atomics for 64bit ints
Reviewed by: jim
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1841109 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Make sure rv is not used uninitialised.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1836236 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
* test/teststr.c (overflow_strfsize): Iterate from LONG_MAX downwards,
avoiding signed integer overflow (undefined behaviour which gcc 8.1
turns into a non-terminating loop).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1834496 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Add the apr_encode_* API that implements RFC4648 and RFC7515
compliant BASE64, BASE64URL, BASE32, BASE32HEX and BASE16
encode/decode functions.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1834377 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testpoll: check that the wakeup pipe is still in the pollset after returning
from poll(), e.g. APR_POLLSET_PORT should re-arm it automatically.
poll, port: re-add the wakeup pipe to the pollset after it triggered.
Just like user fds (file, socket), otherwise it's one shot only (PR-61786).
Corresponding test committed in r1819857.
poll, port: no need to release and re-acquire the lock in between walking the
pollset and handling the dead ring, all is simple/fast/nonblocking ops.
Also, set types of "i" and "j" respectively to the ones of nget and *num.
poll, port: follow up to r1819860.
This test is redundant now, axe it (no functional change).
poll, kqueue: save a pollfd (mem)copy per returned event.
poll, epoll: pollset's pfd is not modified on poll(), mark it const.
Reviewed/backported by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1819937 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
* test/testlock.c (test_timeoutcond): Increase fudge factor in
checking timeout precision; 100ms failed regularly in Fedora builds,
500ms has Never Failed(TM).
* test/testipsub.c (test_parse_addr_port): More tests.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1817889 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* network_io/unix/sockaddr.c (apr_sockaddr_zone_set): Fail
for an address which is not link-local.
* include/apr_network_io.h: Document the above.
* test/testsock.c (test_zone): Test for that.
* test/testsock.c (test_zone): Remove duplicate test,
thanks to rpluem.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1817888 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support IPv6 link-local address scope/zone mapping.
* network_io/unix/sockaddr.c (apr_sockaddr_zone_set,
apr_sockaddr_zone_get): New functions.
(apr_sockaddr_ip_getbuf): Append %scope for link-local address.
(apr_sockaddr_equal): Compare link-local address with different
scopes as not equal.
* include/apr_network_io.h: Add function declarations.
* configure.in: Test for if_indextoname and if_nametoindex.
* test/testsock.c (test_zone): New test case.
* include/arch/win32/apr_private.h: Assume Windows supports
if_nametoindex and if_indextoname.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1816608 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* network_io/unix/sockaddr.c (apr_parse_addr_port): Fix regression in
scope id parsing introduced in r1683521.
* test/testipsub.c (test_parse_addr_port): New function.
Submitted by: rjung, jorton
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1813287 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
* test/testipsub.c (test_bad_input): Fix test in r1808832 to match
failure code.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1808837 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
* network_io/unix/sockaddr.c (looks_like_ip): Fail for the empty
string.
* test/testipsub.c: Test that calling apr_ipsubnet_create with the
empty string fails.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1808830 13f79535-47bb-0310-9956-ffa450edef68
|