Quoting Joe Schaefer <[EMAIL PROTECTED]>:
This is the right approach, I think. But the person who'd be
in the best place to test/commit it is Bojan. Just be sure
to bump the patch level in apreq_version.h, and add a comment
to CHANGES.
This code hangs the test (Joe Orton's original suggestion):
-------------------------------
do {
apr_bucket *f = APR_RING_FIRST(&in->list);
apr_bucket *l = APR_RING_LAST(&in->list);
APR_RING_UNSPLICE(f, l, link);
APR_RING_SPLICE_TAIL(&out->list, f, l, apr_bucket, link);
} while (e != APR_BRIGADE_FIRST(in));
-------------------------------
This code also hangs the test (Joe Schaefer's subsequent suggestion):
-------------------------------
do {
apr_bucket *f = APR_RING_FIRST(&in->list);
apr_bucket *l = APR_BUCKET_PREV(e);
APR_RING_UNSPLICE(f, l, link);
APR_RING_SPLICE_TAIL(&out->list, f, l, apr_bucket, link);
} while (e != APR_BRIGADE_FIRST(in));
-------------------------------
When compiled with -fno-strict-aliasing, Joe Schaefer's suggestion
passes the test, Joe Orton's suggestion hangs the test.
Or maybe I misunderstood what the code should actually be?
--
Bojan