| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix various issues found by cppcheck
- error handling issues
- use of uninitialized data
- null pointer dereference
- unused variables
- memory/fd leaks
- broken code in threadproc/beos/proc.c
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1183724 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Fix crash with --enable-allocator-uses-mmap on machines with pagesize >= 8k.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1130276 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Cleanups for various gcc warnings, conditional assignment and type errors
Submitted by: wrowe
Reviewed by: trawick
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1083810 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new configure option --enable-allocator-uses-mmap to use mmap
instead of malloc in apr_allocator_alloc(). This greatly reduces
memory fragmentation with malloc implementations (e.g. glibc) that
don't handle allocationss of a page-size-multiples in an efficient way.
It also makes apr_allocator_max_free_set() actually have some effect
on such platforms.
The handling of page sizes other than 4k seems like a lot of trouble for a
very small number of platforms, but there does not seem to be a reasonable
way to check this at compile time.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1083592 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Fix various off-by-one errors related to current_free_index:
current_free_index counts pages of size BOUNDARY_SIZE, but every node contains
index + 1 of such pages
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1083585 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix overflow in pools and rmm, where size alignment was taking place.
Reported by: Matt Lewis <mattlewis@google.com>
memory/unix/apr_pools.c
(allocator_alloc, apr_palloc): Check for overflow after aligning size.
(apr_pcalloc): Drop aligning of size; clearing what the caller asked for should suffice.
Submitted by: Matt Lewis <mattlewis@google.com>, Sander Striker
Backports: 800730
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@800731 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@761345 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@678139 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
original API
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@675117 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@648527 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@647447 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@647394 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@647390 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@647384 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
thereof:
* memory/unix/apr_pools.c (node_free_space): New macro.
(apr_palloc, psprintf_flush): Use it; correctly compare against
free space using <= rather than <.
Submitted by: Maxim Yegorushkin <maxim.yegorushkin gmail.com>, jorton
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@645436 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: 40955
Submitted by: Peter Steiner <peter.steiner+apache hugwi.ch>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@585357 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@551962 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
with verbose pool debugging enabled on LP64 platforms.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@495651 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
with verbose debugging enabled.
PR: 41063
Submitted by: Peter Steiner <peter.steiner+apache hugwi.ch>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@493838 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
PR: 41063
Submitted by: Peter Steiner <peter.steiner+apache hugwi.ch>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@493834 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
(apr_allocator_t): Add comments for struct members.
Submitted by: Peter Steiner <peter.steiner+apache hugwi.ch>
PR: 40955
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@488084 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
aren't any process boundaries on NetWare which makes the global_pool global to all applications, return the application specific pool as the global_pool.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@411301 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
change; add comment.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@384722 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
test; global_pool is guaranteed to be non-NULL, so parent is
guaranteed to be non-NULL here.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@384465 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
with a poison byte before freeing them to help highlight
use-after-free bugs.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@328355 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
making it match the non-debug version.
Submitted By: Henry Jen <henryjen ztune.net>
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@240370 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Add some cheap loop detection to abort if the cleanup list is corrupt.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@239666 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
destroys a joined pool: (catches the mod_include pool lifetime issues
described in PR 12655)
* memory/unix/apr_pools.c (pool_destroy_debug): Renamed from
apr_pool_destroy_debug; made static. (apr_pool_destroy_debug): New
function, wrapper for pool_destroy_debug; abort if called on a joined
pool.
(pool_clear_debug): Use pool_destroy_debug rather than the wrapper
to destroy subpools.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@179208 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
* include/apr_pools.h (apr_pool_is_ancestor): Note special semantics
for joined pools.
* memory/unix/apr_pools.c (apr_pool_join): Implement.
(apr_pool_is_ancestor): Adjust for joined pools.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@168115 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@158849 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
pools. I found this very helpful when trying to debug things that detach from the tty, like httpd when not running with -DONE_PROCESS. If 'APR_POOL_DEBUG_LOG' is not set, the original behavoir of spewing out on stderr is maintained.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@158839 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Tipped-of-by: Uwe Zeisberger
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65364 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
register/kill of a cleanup against a single pool:
* memory/unix/apr_pools.c (struct apr_pool_t): Add freelist for
cleanup structures.
(apr_pool_cleanup_kill): Move used cleanup structures onto the
freelist.
(apr_pool_cleanup_register): Reuse cleanup structure if available.
(apr_pool_clear, pool_clear_debug, apr_pool_create): Clear the freelist.
* test/testpools.c (checker_cleanup, success_cleanup, test_cleanups):
Add tests for cleanups.
PR: 23567 (the easy half)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65206 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
upon Python at packaging time, but not at end-user config/build time. As far
as I can tell, the build continues to function properly. (out-of-dir
config/make not tested, and apr-iconv prolly needs some work)
The buildconf scripts now generate a build-outputs.mk file which is included
by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk
specifies all of the various files present in the distribution.
The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather
than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports.
The corresponding delete-* targets were eliminated since we have a precise
set of inputs.
The subdirs' Makefiles were removed since they are no longer called/used.
The apr-util/uri Makefile was responsible for compiling a C program to
generate the uri_delims.h file. That process was replaced by a Python script
to generate the header (called by buildconf). The .c and .dsp were left for
the Windows build to continue, but that should be revamped.
build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of
cleanup is still needed. Much of the recursive/local/x- logic is no longer
needed and can be elimianated. rules.mk was created for inclusion by N
makefiles, but that isn't really true any more, so it could probably be
tossed (caveat: test/Makefile). Saved for a phase 2.
Some additional work was added to properly clean up files in */build/,
rather than relying on a makefile in there.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
so that the clean up will happen regardless of the debugging mode.
Submitted by: Jean-Jacques Clar [jjclar@novell.com]
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64889 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
APR global pool allows it to allocate memory and set cleanups that will never happen even if the application terminates.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64825 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
(pool_clear_debug): When there is a child pool present after cleanups
have been run, we know that a cleanup created a child pool. This
results in orphaned pools, so in debug mode, abort().
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64735 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: Greg Stein, Cliff Woolley, Sander Striker
* memory/unix/apr_pools.c
(list_insert, list_remove): new macros to do manipulation of lists
throughout the pools code.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64701 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
apr_pools.c:561: warning: implicit declaration of function `apr_atomic_init'
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64657 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(apr_initialize): Remove atomics initialization from this function. Due
to circular dependency, doing it here is too late.
* memory/unix/apr_pools.c
(apr_pool_initialize): Add atomics initialization to the release and debug
versions. This has to happen here, since pools rely on mutexes, which
can be backed by atomics. Atomics initialization requires a pool.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64655 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_allocator_get_mutex
apr_allocator_get_owner
apr_allocator_set_max_free
apr_allocator_set_mutex
apr_allocator_set_owner
apr_pool_get_abort
apr_pool_get_parent
apr_pool_set_abort
apr_pool_sub_make
apr_signal_get_description
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64606 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
(apr_pool_create_ex): Use the correct mutex when adding the pool to
the pools parent child list.
Submitted by: Brad Nicholes, Jean-Jacques Clar <jjclar@novell.com>
Reviewed by: Cliff Woolley, Sander Striker
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64572 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mechanisms, causing an Apache child process to crash. The crash was first
reported by David Endler <DEndler@iDefense.com> and was researched and fixed by
Joe Orton <jorton@redhat.com>. Details will be released on 30 May 2003.
CVE: CAN-2003-0245
Reported by: David Endler <DEndler@iDefense.com>
Submitted by: Joe Orton <jorton@redhat.com>
Reviewed by: Justin, Jim, Jeff
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64511 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
(apr_pool_check_integrity): Only log when being verbose.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64406 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
availability and lifetime of the hproc process handle.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64388 13f79535-47bb-0310-9956-ffa450edef68
|