summaryrefslogtreecommitdiff
path: root/buckets
Commit message (Collapse)AuthorAgeFilesLines
* * We cannot access list any longer after we called apr_allocator_free as it ↵Ruediger Pluem2018-01-261-2/+11
| | | | | | points to memory we just freed. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1822315 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1788334: apr_allocator_align() should take an allocator asYann Ylavic2017-04-032-4/+6
| | | | | | | | | | | | argument, for better scalability of the API. Update apr_bucket_alloc_aligned_floor() from r1788335 accordingly. Suggested by ivan. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1789947 13f79535-47bb-0310-9956-ffa450edef68
* apr_buckets: Add apr_bucket_file_set_buf_size() which allows to configureYann Ylavic2017-03-232-3/+35
| | | | | | | | the size of the buffer used to read files. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1788335 13f79535-47bb-0310-9956-ffa450edef68
* Don't corrupt the bucket allocator in out-of-mem situationStefan Fritsch2013-01-261-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1438960 13f79535-47bb-0310-9956-ffa450edef68
* Add valgrind supportStefan Fritsch2013-01-261-3/+12
| | | | | | | | | | | | | | | | | Teach valgrind about apr pools, allocators, and bucket allocators if --with-valgrind is passed to configure. This has less impact on program behavior and performance than compiling with complete pool-debugging. Even with valgrind support compiled in, the performance impact if not running under valgrind should be minimal. It may make sense to use pool-debugging together with valgrind support because pool-debugging does not help with allocators and bucket allocators. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1438957 13f79535-47bb-0310-9956-ffa450edef68
* Revert r789061, r758414, and r758398 which are leftovers of the palloc usesStefan Fritsch2013-01-191-8/+28
| | | | | | | | | | | | malloc experiment that were forgotten when reverting to the old code in r795598. This fixes the apr_allocator created by apr_bucket_alloc_create() being leaked by apr_bucket_alloc_destroy. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1435605 13f79535-47bb-0310-9956-ffa450edef68
* Make sure we abort, even if the abortfunc returnsStefan Fritsch2012-11-061-2/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1406088 13f79535-47bb-0310-9956-ffa450edef68
* If out of mem, abort instead of crashing. Use the pool's abort functionStefan Fritsch2012-10-271-4/+7
| | | | | | | if it has one. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402907 13f79535-47bb-0310-9956-ffa450edef68
* Make apr_brigade_(v)putstrs more efficient by using apr_brigade_writevStefan Fritsch2012-10-271-4/+17
| | | | | | | instead of apr_brigade_write git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402903 13f79535-47bb-0310-9956-ffa450edef68
* Fix potential data corruption in apr_brigade_write() and friends ifStefan Fritsch2012-10-271-3/+9
| | | | | | | | | the last bucket of the brigade is a heap bucket that has been split, and there are still references to the next part of the original bucket in use. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402897 13f79535-47bb-0310-9956-ffa450edef68
* Remove duplicated logic in apr_brigade_puts().Stefan Fritsch2012-10-271-23/+1
| | | | | | | | PR: 53740 Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1402870 13f79535-47bb-0310-9956-ffa450edef68
* apr_brigades: prevent infinite loop on a corrupt brigadeNick Kew2011-05-131-0/+10
| | | | | | | PR 51062 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1102687 13f79535-47bb-0310-9956-ffa450edef68
* SECURITY: CVE-2010-1623 (cve.mitre.org)Jeff Trawick2010-10-011-1/+12
| | | | | | | | | | Fix a denial of service attack against apr_brigade_split_line(). Submitted by: sf Reviewed by: trawick, jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1003491 13f79535-47bb-0310-9956-ffa450edef68
* Add debugging traps for use-after-destroy of a brigade:Joe Orton2010-06-051-2/+18
| | | | | | | | | | | | | | | | * buckets/apr_brigade.c (apr_brigade_cleanup): Check brigade consistency. (apr_brigade_destroy) [APR_BUCKET_DEBUG]: Check brigade consistency before destroying it, and clear b->p, b->bucket_alloc after. * include/apr_buckets.h (APR_BRIGADE_CHECK_CONSISTENCY): assert that b->p and b->bucket_alloc are non-NULL. Suggested by: sf git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@951762 13f79535-47bb-0310-9956-ffa450edef68
* Use the APR_FOPEN_* constants instead of the deprecated APR_* constantsGraham Leggett2010-03-021-2/+2
| | | | | | | within code outside the file_io code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@917837 13f79535-47bb-0310-9956-ffa450edef68
* Convert various APU_DECLARE into APR_DECLARE.Bojan Smojver2009-07-1613-66/+66
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@794523 13f79535-47bb-0310-9956-ffa450edef68
* more NetWare build tweaks.Guenter Knauf2009-06-281-261/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789154 13f79535-47bb-0310-9956-ffa450edef68
* more NetWare build tweaks.Guenter Knauf2009-06-281-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789137 13f79535-47bb-0310-9956-ffa450edef68
* Remove dead debug code referencing apr_pool_allocator_get, which doesn't ↵Paul Querna2009-06-281-5/+0
| | | | | | exist anymore. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789061 13f79535-47bb-0310-9956-ffa450edef68
* fixed NetWare build.Guenter Knauf2009-06-271-0/+261
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789020 13f79535-47bb-0310-9956-ffa450edef68
* * Fix off by one overflow in apr_brigade_vprintf.Ruediger Pluem2009-04-241-3/+0
| | | | | | | | | | | For the gory details see http://mail-archives.apache.org/mod_mbox/apr-dev/200904.mbox/%3c49F21CD2.5020105@collab.net%3e Submitted by: C. Michael Pilato <cmpilato collab.net> Reviewed by: rpluem, trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@768417 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_buckets_alloc.c (alloc_cleanup): UnconditionallyJoe Orton2009-03-251-5/+1
| | | | | | | destroy the allocator since it's unconditionally created. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@758414 13f79535-47bb-0310-9956-ffa450edef68
* * buckets/apr_buckets_alloc.c (apr_bucket_alloc_create): Use a newJoe Orton2009-03-251-8/+3
| | | | | | | allocator since the pool->allocator association has gone. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@758398 13f79535-47bb-0310-9956-ffa450edef68
* Merge APR-Util trunk into APR.Paul Querna2009-03-2413-0/+2122
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@757704 13f79535-47bb-0310-9956-ffa450edef68
* this shouldn't be here any more...Greg Stein2000-12-071-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60906 13f79535-47bb-0310-9956-ffa450edef68
* Remove all files from the buckets directory. This is in preparationRyan Bloom2000-08-1216-5454/+0
| | | | | | | for committing a patch that actually implements filtering. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60498 13f79535-47bb-0310-9956-ffa450edef68
* Fix the patch after Jeff removed the last apr_filter* from theRyan Bloom2000-08-051-9/+0
| | | | | | | request_rec. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60480 13f79535-47bb-0310-9956-ffa450edef68
* - remove patch #3 since it has been appliedGreg Stein2000-08-057-1190/+267
| | | | | | | | - regenerate patch #2 given ap_ -> apr_ rename and presence of patch #3 - update the README git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60479 13f79535-47bb-0310-9956-ffa450edef68
* Make the patch apply and compile again after the apr_ rename.Ryan Bloom2000-08-052-103/+126
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60478 13f79535-47bb-0310-9956-ffa450edef68
* prefix libapr functions and types with apr_Doug MacEachern2000-08-029-146/+146
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
* Make ap_bucket_list_destroy a static function. It should never be usedRyan Bloom2000-08-012-28/+14
| | | | | | | outside the buckets code. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60466 13f79535-47bb-0310-9956-ffa450edef68
* Commit a bunch of docs for the bucket brigades code. This should clearRyan Bloom2000-08-011-14/+149
| | | | | | | | up where things are and where I would like to see them go. Please, if there are any questions, or if I have been unclear, ask. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60465 13f79535-47bb-0310-9956-ffa450edef68
* Update the bucket brigade patch to work with the latest code. This isRyan Bloom2000-07-311-220/+306
| | | | | | | | | | | | a much smaller patch than previous ones IMO. It also contains a lot of comments to help explain what is happening. This patch works with all legacy modules, as well as newer modules. I have removed the chunking filter with the understanding that it was mucking up the patch, and making things hard to follow. After we decide on a filter design, adding chunking back in should be easy to do. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60464 13f79535-47bb-0310-9956-ffa450edef68
* bucket_brigade is too long to type in every function name. This justRyan Bloom2000-07-312-19/+19
| | | | | | | | | changes to names of all of the brigade functions to ap_brigade_foo. I don't think this should cause any confusion, and it sure makes coding this stuff much easier. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60463 13f79535-47bb-0310-9956-ffa450edef68
* Combine the create and write functions. I am leaving the write functionRyan Bloom2000-07-315-18/+32
| | | | | | | | | | | | pointer in the structure because I think it is still useful, but having one API to create a bucket and put data in it is much cleaner. If we decide to have a list of free buckets, then the create function may not call malloc, it may grab a bucket off the free list. Regardless of where the memory comes from, create's job is to grab the memory from someplace and fill out the structure. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60462 13f79535-47bb-0310-9956-ffa450edef68
* "flush_filters" is a misnomer. rename it. also shift it so that we can callGreg Stein2000-07-251-0/+49
| | | | | | | it from sub-request finalization. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60450 13f79535-47bb-0310-9956-ffa450edef68
* Make the changes requested by Greg.Ryan Bloom2000-07-252-19/+18
| | | | | | | | | | | | | | | | | | | | 1) remove all instances of apr_buf.h from the two util_filter files. 2) remove ap_pass_brigade from the two files 3) remove parameters from ap_filter_func type. #3 causes warnings until we add those parameters back in. We can't release 2.0 with these files until we have a filter mechanism in place, so those warnings will go away in time. In the meantime, we just have to live with it. I also added some comments to the bottom of this file mentioning those things that were removed. I tried to keep those comments patch neutral while still leaving enough information for the next guy to help out with the patch implementation Submitted by: Greg Stein and Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60449 13f79535-47bb-0310-9956-ffa450edef68
* oops. gotta declare r->filters. also need a bit of subrequest mgmt for theGreg Stein2000-07-251-0/+76
| | | | | | | | | inserted filters. Submitted by: Greg Stein, Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60446 13f79535-47bb-0310-9956-ffa450edef68
* teeny patch to get the util_filter.[ch] builtGreg Stein2000-07-252-1/+18
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60445 13f79535-47bb-0310-9956-ffa450edef68
* Add the newest try for filter registration to the repository. This isRyan Bloom2000-07-253-0/+373
| | | | | | | | a combination of Greg's and Ryan's previous code. Submitted by: Greg Stein and Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60443 13f79535-47bb-0310-9956-ffa450edef68
* Remove util_filter.c and util_filter.h. This is in preparation forRyan Bloom2000-07-243-257/+0
| | | | | | | | combining all of the code that registers a filter. I am also removing these from README. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60437 13f79535-47bb-0310-9956-ffa450edef68
* Change some function pointer names to reflect what they do better.Ryan Bloom2000-07-236-16/+68
| | | | | | | | And, add some docs about what the bucket brigades do and how they are used. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60415 13f79535-47bb-0310-9956-ffa450edef68
* Fix typo.Ryan Bloom2000-07-211-1/+1
| | | | | | | | Submitted by: Cliff Woolley <JWOOLLEY@wlu.edu> Reviewed by: Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60405 13f79535-47bb-0310-9956-ffa450edef68
* Fix a small memory leak in the buckets. Basically, an extra bucket wasRyan Bloom2000-07-211-1/+1
| | | | | | | | | being created and never inserted into the list, so it was never destroyed. Submitted by: Cliff Woolley <JWOOLLEY@wlu.edu> Reviewed by: Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60404 13f79535-47bb-0310-9956-ffa450edef68
* Include the chunking filter in the current build. This doesn't workRyan Bloom2000-07-201-62/+56
| | | | | | | | correctly currently, but it isn't actually turned on right now either, so I don't mind that too much. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60396 13f79535-47bb-0310-9956-ffa450edef68
* Update ryan.patch to work with the latest changes in the buckets. ThisRyan Bloom2000-07-201-397/+70
| | | | | | | | | also includes a small chunking filter that doesn't work correctly. The chunking filter is not enabled, and hopefully I will be able to fix it later today. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60395 13f79535-47bb-0310-9956-ffa450edef68
* Remove the ap_bucket_new function. This was basically a case statementRyan Bloom2000-07-206-41/+13
| | | | | | | | | | around a couple of other functions. This keeps people from implementing their own bucket types and plugging them into the server. With this change buckets are created by ap_bucket_foo_create, and modified/used with the function pointers. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60394 13f79535-47bb-0310-9956-ffa450edef68
* Describe the design threads I committed last week.Roy T. Fielding2000-07-181-3/+20
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60389 13f79535-47bb-0310-9956-ffa450edef68
* Add a split function for buckets. This basically just takes one bucketRyan Bloom2000-07-186-7/+77
| | | | | | | | and makes it two buckets. This is useful if you want to insert something in the middle of some data already in the brigade. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60384 13f79535-47bb-0310-9956-ffa450edef68
* Remove the ap_bucket_list type. This moves the next/prev pointers downRyan Bloom2000-07-177-121/+384
| | | | | | | | | | | | to the ap_bucket type. The reasoning behind the bucket_list was never very clear, and there were some annoyming memory leaks caused by keeping that type filters. This also cleans up those memory leaks. finally, this tightens up the API a bit more. Submitted by: Cliff Woolley <jwoolley@wlu.edu> Reviewed by: Ryan Bloom git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60383 13f79535-47bb-0310-9956-ffa450edef68