httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <bo...@rexursive.com>
Subject Re: Endless loop in split_on_bdry() of library/parser_multipart.c?
Date Thu, 15 Jun 2006 23:04:16 GMT
Quoting Joe Schaefer <joe+gmane@sunstarsys.com>:

> 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

Mime
View raw message