summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix handle leak in the Win32 apr_uid_current implementation.wrowe2021-09-162-8/+22
| | | | | | | | | Backports: r1860057 Submitted by: ivan Reviewed by: wrowe git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1893388 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1893198 from trunk:ylavic2021-09-122-6/+3
| | | | | | | | | | | | poll: don't #include sys/poll.h if poll.h is available. With musl libc, this fixes: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1893277 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1892618 from trunk:ylavic2021-09-091-2/+2
| | | | | | | | | | | | apr_tables: fix petential left shift of 31 on an int. apr_tables.c:832:10: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'. Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1893197 13f79535-47bb-0310-9956-ffa450edef68
* Update config.guess and config.sub fromrjung2021-08-312-826/+998
| | | | | | | | | https://git.savannah.gnu.org/cgit/config.git. Backport of r1892754 from trunk. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1892755 13f79535-47bb-0310-9956-ffa450edef68
* SECURITY: CVE-2021-35940 (cve.mitre.org)jorton2021-08-161-0/+5
| | | | | | | | | | | | | | | Restore fix for CVE-2017-12613 which was missing in 1.7.x branch, though was addressed in 1.6.x in 1.6.3 and later via r1807976. The fix was merged back to 1.7.x in r1891198. Since this was a regression in 1.7.0, a new CVE name has been assigned to track this, CVE-2021-35940. Thanks to Iveta Cesalova <icesalov redhat.com> for reporting this issue. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1892358 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1891204 from trunk:jorton2021-07-052-0/+11
| | | | | | | | | | | | * locks/unix/thread_mutex.c, 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/branches/1.7.x@1891269 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1889604, r1807975 from trunk:jorton2021-07-023-2/+11
| | | | | | | | | | | | | | * random/unix/sha2.c (apr__SHA256_Final, apr__SHA256_End): Fix parameter buffer lengths to match declaration, avoiding GCC 11 warning. (no functional change) Bounds-check human-readable date fields (credit: Stefan Sperling) Submitted by: jorton, niq Reviewed by: jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1891198 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1878340, r1878343, r1878354, r1878365, r1878342 from trunk:jorton2021-07-025-10/+30
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Backport r1861050, r1805309, r1861045, r1861046, r1861049, r1861053, ↵michaelo2021-05-264-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r1861054, r1861061 from trunk: * misc/win32/misc.c (apr_get_oslevel): Fix condition to actually return APR_EGENERAL on unsupported OS. === apr_socket_listen(): Allow larger backlog queue lengths on Windows 8+. Starting with Windows 8, the socket listen() function accepts a special SOMAXCONN_HINT(N) argument that allows making the backlog queue length larger than the otherwise predefined limit of around 200: https://msdn.microsoft.com/en-us/library/windows/desktop/ms739168 https://blogs.msdn.microsoft.com/winsdk/2015/06/01/winsocks-listen-backlog-offers-more-flexibility-in-windows-8/ Having a larger listen backlog can be used for certain high performance applications that need to handle lots of incoming connections. One example would be the httpd server with it's "ListenBacklog" directive where setting it to a larger value currently allows serving more concurrent connections on Windows with mpm_winnt. * include/arch/win32/apr_arch_misc.h (enum apr_oslevel_e): Add APR_WIN_8. * misc/win32/misc.c (apr_get_oslevel): Determine whether we are running on Windows 7 or on Windows 8+. * network_io/win32/sockets.c (SOMAXCONN_HINT): Define this macro in case we are building against an older version of Windows SDK. (apr_socket_listen): Use SOMAXCONN_HINT() for the backlog queue length if it's supported by the Windows version we are running on. Patch by: Evgeny Kotkov <evgeny.kotkov {at} visualsvn.com> === * misc/win32/misc.c (apr_get_oslevel): Check return code from GetVersionEx(). === * misc/win32/misc.c (apr_get_oslevel): Do not use static variables to protect from potential race condition. === * misc/win32/misc.c (apr_get_oslevel): Use GetVersionExW() with OSVERSIONINFOEXW to version information with service pack info. === * include/arch/win32/apr_arch_misc.h (enum apr_oslevel_e): Add APR_WIN_8_1. * misc/win32/misc.c (apr_get_oslevel): Determine whether we are running on Windows 8 or on Windows 8.1+. === Fix problem that apr_get_oslevel() was returning APR_WIN_XP on Windows 10. * include/arch/win32/apr_arch_misc.h (enum apr_oslevel_e): Add APR_WIN_10. * misc/win32/misc.c (apr_get_oslevel): Return APR_WIN_10 when dwMajorVersion is greater than 6. === * include/arch/win32/apr_arch_misc.h (enum apr_oslevel_e): Add APR_WIN_7_SP1. * misc/win32/misc.c (apr_get_oslevel): Determine whether we are running on Windows 7 or on Windows 7 SP1. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1890230 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1890191 from trunk:michaelo2021-05-251-1/+1
| | | | | | | | | | Use portable make variables 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/branches/1.7.x@1890192 13f79535-47bb-0310-9956-ffa450edef68
* Bump patch version to 1michaelo2021-05-241-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1890173 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1887490, r1888251 from trunk:ylavic2021-03-312-4/+4
| | | | | | | | | | | | | | | | | 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
* Merge r1888017 from trunk:ylavic2021-03-241-2/+9
| | | | | | | | | | | | | | Follow up to r1887279: fix new APR_TRY_COMPILE_NO_WARNING. 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/branches/1.7.x@1888018 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1887506 from trunk:ylavic2021-03-111-2/+4
| | | | | | | | | | | | Follow up to r1887060: fix compilation on BEOS. poffset is undefined there, by inspection (no BEOS at hand..). Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1887508 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1883666 from trunk:ylavic2021-03-111-1/+1
| | | | | | | | | | | | 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
* Merge r1887060 from trunk:ylavic2021-03-115-36/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Merge r1887481, r1887482 from trunk:ylavic2021-03-111-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | apr_skiplist: Handle ENOMEM from skiplisti_init(), fixing a compiler warning. 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. Follow up to r1887481: fix skiplisti_init() returned pointer. Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1887486 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1887279 from trunk:ylavic2021-03-111-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | build/apr_common.m4: avoid explicit inclusion of "confdefs.h" 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/branches/1.7.x@1887485 13f79535-47bb-0310-9956-ffa450edef68
* Merge r936323, r1460182, r1884077, r1884078 from trunk:ylavic2020-12-0410-37/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OS/2: Clean up a thread's pool when it terminates. <not backported in 1.7.x> Add apr_pool_owner_set function to allow use of pool debugging with threads Actually this function has been mentioned in the docs for over 10 years but has never been implemented. </not backported in 1.7.x> Also consistently destroy the thread's pool when it exits normally, not only on apr_thread_exit(). This was already done on OS2. Other platforms than unix are untested. apr_thread: destroy the thread's pool at _join() time, unless _detach()ed. 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(). apr_thread: use unmanaged pools for detached threads. 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. Submitted by: bjh, sf, ylavic, ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1884103 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1806296, r1883805 from trunk:ylavic2020-12-041-63/+32
| | | | | | | | | | | | | | | Factor out common code in apr_pools.c. No function changes intended. * memory/unix/apr_pools.c (allocator_lock, allocator_unlock): New helpers. (apr_allocator_max_free_set, allocator_alloc, allocator_free): Use allocator_lock() and allocator_unlock(). apr_pools: two more uses of allocator_[un]lock() helpers to simplify the code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1884101 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1883800, r1883801, r1883802, r1883806 from trunk:ylavic2020-12-041-98/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_pools: follow up to r1883750. Make apr_pool_clear_debug() always lock the parent mutex, regardless of whether its own mutex is the same (inherited), otherwise the race with apr_pool_walk_tree() is still not addressed in any case. There is no risk of the mutex being destroyed while locked since it's been created on an ancestor pool, and the cleanups can still use the mutex since it's APR_THREAD_MUTEX_NESTED. Also, in apr_pool_create_ex_debug(), create/inherit the mutex before the pool is registered in the parent, or it can be accessed by apr_pool_walk_tree() with the a NULL mutex and thus breaking the rules. For unmanaged pools, even though they have no parent pool, they can still have children that can be cleared/destroyed so the synchronization with apr_pool_walk_tree() still applies. And since the allocator plays no role in APR_POOL_DEBUG mode, apr_pool_create_unmanaged_ex_debug() must always create the mutex, regardless of whether an allocator is provided. While doing this change in apr_pool_create_unmanaged_ex_debug(), this commit also moves the corresponding code (creating the mutex) at the same place as it's moved in apr_pool_create_ex_debug(), to ease reading/comparing the two functions. apr_pools: follow up to r1883750 and r1883800. After r1883800, the mutex of a pool in APR_POOL_DEBUG can't be NULL, so remove useless NULL checks around locking. apr_pools: follow up to r1883750. Don't release and re-acquire the lock in apr_pool_destroy_debug() between pool_clear_debug() and the removal of the pool from the parent, so that apr_pool_walk_tree() has no chance to find a pool being destroyed. This is done like in apr_pool_clear_debug(), all the necessary locking goes to apr_pool_destroy_debug() which then calls pool_destroy_debug() in the critical section. Note that pool_destroy_debug() when called from pool_clear_debug() is not locking the parent mutex by itself anymore, thus the pool being cleared there is not locked when its children are destroyed (just like before r1883750). This is not an issue though because the parent mutex is supposed to protect against concurrent access from apr_pool_walk_tree() on an ancestor, not an illegal operation from another thread on a pool being cleared. That is always undefined behaviour with debug and non-debug pools, though the latter might detect it with apr_pool_check_owner(), not the pool being cleared's business anyway. apr_pools: add and use pool_[un]lock() and parent_[un]lock() helpers. To avoid #ifdef'ery in relevant code and thus help readers. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1884100 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1883870 from trunk:ylavic2020-11-272-25/+59
| | | | | | | 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
* Merge r1883868 from trunk:ylavic2020-11-271-1/+1
| | | | | | | apr_encode_base32: fix estimated output *len (when called with src == NULL). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883879 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1883728, r1883742 from trunk:ylavic2020-11-231-0/+8
| | | | | | | | | | | | apr_sockaddr_ip_get[buf]: handle APR_UNIX family. For unix sockets, return the path (sun_path). Follow up to r1883728: uncomment the change, and fix apr_cpystrn() args orrder. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883753 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1883749 from trunk:ylavic2020-11-231-6/+14
| | | | | | | | | | | | | | | apr_pools: fix __attribute__((nonnull)) warning in [pre_]cleanup_register. Since apr_[pre_]cleanup_register() functions are declared ((nonnull)) for plain_cleanup_fn and child_cleanup_fn, the compiler (gcc-9 here) issues a warning when we check them for !NULL is the code. To preserve APR_POOL_DEBUG checks still with compilers that don't support this __attribute__, let's work around this by checking NULL values afterward for c, c->plain_cleanup_fn and c->child_cleanup_fn. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883752 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1883750 from trunk:ylavic2020-11-231-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_pools: lock parent pool in pool_destroy_debug(). By using apr_pool_clear_debug() instead of pool_clear_debug() in pool_destroy_debug() we gain the locking provided by the former and thus protection from concurrent access from apr_pool_walk_tree(), which is undefined behaviour. While pool_destroy_debug()=>apr_pool_clear_debug()=>pool_clear_debug() calls pool_destroy_debug() for all the children pools, this does not cause a deadlock because apr_pool_clear_debug() locks the parent pool only (not the pool itself) and thus pool_destroy_debug(pool->child) locks the current pool with no issue. This fixes use-after-free like the below in httpd (with -D APR_POOL_DEBUG): ================================================================= ==2026856==ERROR: AddressSanitizer: heap-use-after-free on address 0x60600025acf0 at pc 0x7fe738f4c5be bp 0x7fe718598110 sp 0x7fe718598108 READ of size 8 at 0x60600025acf0 thread T51 #0 0x7fe738f4c5bd in apr_thread_mutex_lock locks/unix/thread_mutex.c:124 #1 0x7fe738f4e01c in apr_pool_walk_tree memory/unix/apr_pools.c:1505 #2 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511 #3 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511 #4 0x7fe738f4e066 in apr_pool_walk_tree memory/unix/apr_pools.c:1511 #5 0x7fe738f5027c in apr_pool_find memory/unix/apr_pools.c:2291 #6 0x7fe738f14aba in apr_table_mergen tables/apr_tables.c:746 #7 0x5578ad926a25 in ap_set_keepalive /home/ylavic/src/apache/httpd/trunk/modules/http/http_protocol.c:309 #8 0x5578ad93933f in ap_http_header_filter /home/ylavic/src/apache/httpd/trunk/modules/http/http_filters.c:1376 #9 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783 #10 0x5578ad9a67f3 in ap_content_length_filter /home/ylavic/src/apache/httpd/trunk/server/protocol.c:2046 #11 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783 #12 0x5578ad9405ae in ap_byterange_filter /home/ylavic/src/apache/httpd/trunk/modules/http/byterange_filter.c:463 #13 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783 #14 0x7fe7330e398b in ap_headers_output_filter /home/ylavic/src/apache/httpd/trunk/modules/metadata/mod_headers.c:891 #15 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783 #16 0x7fe732e32dba in session_output_filter /home/ylavic/src/apache/httpd/trunk/modules/session/mod_session.c:501 #17 0x5578ad98f7bd in ap_pass_brigade /home/ylavic/src/apache/httpd/trunk/server/util_filter.c:783 #18 0x5578ad9c8ee5 in default_handler /home/ylavic/src/apache/httpd/trunk/server/core.c:5188 #19 0x5578ad9431bb in ap_run_handler /home/ylavic/src/apache/httpd/trunk/server/config.c:170 #20 0x5578ad944941 in ap_invoke_handler /home/ylavic/src/apache/httpd/trunk/server/config.c:444 #21 0x5578ad92cc23 in ap_process_async_request /home/ylavic/src/apache/httpd/trunk/modules/http/http_request.c:463 #22 0x5578ad924d7c in ap_process_http_async_connection /home/ylavic/src/apache/httpd/trunk/modules/http/http_core.c:158 #23 0x5578ad925410 in ap_process_http_connection /home/ylavic/src/apache/httpd/trunk/modules/http/http_core.c:252 #24 0x5578ad97e04d in ap_run_process_connection /home/ylavic/src/apache/httpd/trunk/server/connection.c:42 #25 0x7fe735c7ef79 in process_socket /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1097 #26 0x7fe735c856a0 in worker_thread /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:2386 #27 0x7fe738f7cef4 in dummy_worker threadproc/unix/thread.c:145 #28 0x7fe738e3eea6 in start_thread nptl/pthread_create.c:477 #29 0x7fe738d6ed4e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfdd4e) 0x60600025acf0 is located 48 bytes inside of 64-byte region [0x60600025acc0,0x60600025ad00) freed by thread T63 here: #0 0x7fe7391ed277 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x107277) #1 0x7fe738f4e9e5 in pool_clear_debug memory/unix/apr_pools.c:1893 #2 0x7fe738f4ecb2 in pool_destroy_debug memory/unix/apr_pools.c:1956 #3 0x7fe738f4eeeb in apr_pool_destroy_debug memory/unix/apr_pools.c:2002 #4 0x5578ada2534b in ap_queue_info_push_pool /home/ylavic/src/apache/httpd/trunk/server/mpm_fdqueue.c:230 #5 0x7fe735c81412 in process_lingering_close /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1686 #6 0x7fe735c7f9bc in process_socket /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:1255 #7 0x7fe735c856a0 in worker_thread /home/ylavic/src/apache/httpd/trunk/server/mpm/event/event.c:2386 #8 0x7fe738f7cef4 in dummy_worker threadproc/unix/thread.c:145 #9 0x7fe738e3eea6 in start_thread nptl/pthread_create.c:477 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883751 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1883340:brane2020-11-122-3/+46
| | | | | | | | | | 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
* Fix some doxygen syntax.jailletc362020-11-081-1/+1
| | | | | | | | @param should not be used inside description, or it will break the rendering (r1883196 in trunk) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883197 13f79535-47bb-0310-9956-ffa450edef68
* Fix a doxygen syntax.jailletc362020-11-081-2/+2
| | | | | | | | Remove a trailing '.' to be consistent. (r1883194 in trunk) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883195 13f79535-47bb-0310-9956-ffa450edef68
* Fix some doxygen syntax.jailletc362020-11-081-5/+5
| | | | | | | | @param should not be used inside description, or it will break the rendering (r1883192 in trunk) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1883193 13f79535-47bb-0310-9956-ffa450edef68
* #ifdef HAVE_ARPA_INET_Hjim2020-10-291-0/+3
| | | | | | | | | #include <arpa/inet.h> #endif is required for inet_addr git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1882981 13f79535-47bb-0310-9956-ffa450edef68
* calls to exit() require stdlib.h or else we get ↵jim2020-10-293-1/+22
| | | | | | -Werror,-Wimplicit-function-declaration git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1882980 13f79535-47bb-0310-9956-ffa450edef68
* PR 63491niq2020-09-301-1/+1
| | | | | | | Update 1.7 win32 blocking in line with trunk and 1.6.x git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1882155 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1878355: CHANGES entry.ylavic2020-06-011-0/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1878356 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1878279 from trunk:ylavic2020-06-011-1/+4
| | | | | | | | | | | | | | | | | apr_file_mktemp: clear APR_FOPEN_NOCLEANUP if not requested. apr_os_file_put() adds no cleanup so it forces APR_FOPEN_NOCLEANUP, but when apr_file_mktemp() adds the cleanup implicitely (unless the user specifies APR_FOPEN_NOCLEANUP explicitely), it needs to clear APR_FOPEN_NOCLEANUP for the resulting file. Note: Without this fix, a file created with apr_file_mktemp() and later passed to apr_file_setaside(), or within a file bucket passed to apr_bucket_setaside(), will leak both the fd and inode because the cleanup gets dropped (e.g. httpd's BZ 64452). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1878355 13f79535-47bb-0310-9956-ffa450edef68
* Merge r1856873 from trunk:ylavic2020-04-304-46/+18
| | | | | | | Address some warnings raised by MSVC-32/64. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1877195 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1875065minfrin2020-03-102-7/+11
| | | | | | | | | | | APR's configure script uses AC_TRY_RUN to detect whether the return type of strerror_r is int. When cross-compiling this defaults to no. This commit adds an AC_CACHE_CHECK so users who cross-compile APR may influence the outcome with a configure variable. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1875066 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1875062minfrin2020-03-102-7/+9
| | | | | | | | | Add a cache check with which users who cross-compile APR can influence the outcome of the /dev/zero test by setting the variable ac_cv_mmap__dev_zero=yes git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1875064 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1478954.minfrin2020-03-102-0/+6
| | | | | | | | | | | | Trick autoconf into printing the correct default prefix in the help The defaults of some dirs like libexecdir are still not printed correctly, though. PR: 54032 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1875057 13f79535-47bb-0310-9956-ffa450edef68
* Don't try to use PROC_PTHREAD by default when cross compiling.minfrin2020-02-052-2/+11
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1873594 13f79535-47bb-0310-9956-ffa450edef68
* Update config.guess and config.sub fromrjung2020-01-012-10/+15
| | | | | | | | | https://git.savannah.gnu.org/cgit/config.git. Backport of r1872203 from trunk. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872204 13f79535-47bb-0310-9956-ffa450edef68
* Happy New Year 2020rjung2020-01-012-2/+2
| | | | | | | Backport of r1872195 from trunk. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872197 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1872164.minfrin2020-01-011-1/+1
| | | | | | | Fix the name of libtool when cross compiling. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872165 13f79535-47bb-0310-9956-ffa450edef68
* Add the ability to cross compile APR.minfrin2019-12-312-0/+24
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872147 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1871998minfrin2019-12-276-8/+146
| | | | | | | | | | | | While cross-compiling, the tools/gen_test_char could not be executed at build time, use AX_PROG_CC_FOR_BUILD to build native tools/gen_test_char Support explicit libtool by variable assigning before buildcheck.sh, it is helpful for cross-compiling (such as libtool=aarch64-linux-libtool) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872037 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1872034.minfrin2019-12-272-1/+4
| | | | | | | Avoid an overflow on 32 bit platforms. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1872035 13f79535-47bb-0310-9956-ffa450edef68
* Backport r1871980.minfrin2019-12-263-44/+10
| | | | | | | Use AC_CHECK_SIZEOF, so as to support cross compiling. PR 56053. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1871981 13f79535-47bb-0310-9956-ffa450edef68
* Backport 1865343minfrin2019-08-234-7/+9
| | | | | | | Add --tag=CC to libtool invocations. PR 62640. [Michael Osipov] git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1865793 13f79535-47bb-0310-9956-ffa450edef68
* Add empty stubs for APR pool functions, that arerjung2019-07-172-17/+27
| | | | | | | | | | | | | | only needed when APR_POOL_DEBUG is defined, but can be aor should be called from app code. Providing stubs allows the app code to stay the same when running with or without debugging APR lib (no need for app recompilation). Backport of r1863217 from trunk. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1863234 13f79535-47bb-0310-9956-ffa450edef68
* No functional change, only formatting.rjung2019-07-171-1/+0
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1863215 13f79535-47bb-0310-9956-ffa450edef68