Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changes-entries/pr69901.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*) mod_file_cache: Fix crashes for mmap'ed files under threaded
MPMs. PR 69901. barr.israel <barr.israel campus.technion.ac.il>

6 changes: 2 additions & 4 deletions modules/cache/mod_file_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,10 @@ static int mmap_handler(request_rec *r, a_file *file)
#if APR_HAS_MMAP
conn_rec *c = r->connection;
apr_bucket *b;
apr_mmap_t *mm;
apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);

apr_mmap_dup(&mm, file->mm, r->pool);
b = apr_bucket_mmap_create(mm, 0, (apr_size_t)file->finfo.size,
c->bucket_alloc);
b = apr_bucket_immortal_create((const char *)file->mm->mm,
(apr_size_t)file->finfo.size, c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
b = apr_bucket_eos_create(c->bucket_alloc);
APR_BRIGADE_INSERT_TAIL(bb, b);
Expand Down
Loading