httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: Endless loop in split_on_bdry() of library/parser_multipart.c?
Date Thu, 01 Jun 2006 03:20:30 GMT
Bojan Smojver <bojan@rexursive.com> writes:

> Quoting Joe Schaefer <joe+gmane@sunstarsys.com>:
>
>> Are you sure the "intermediate code" is correct?
>> It's calling free and destroy, which makes me think
>> that's some other "delete buckets" loop, not this one.>
>
> Nice catch! The correct snippet is:
>
> -------------------------------
>             do {
>                 apr_bucket *f = (&(in)->list)->next;
>                 do { (((((f))))->link.prev)->link.next =  ((((f))))->link.next;
> (((((f))))->link.next)->link.prev =  ((((f))))->link.prev; } while (0);
>                 do { apr_bucket *ap__b = (f); do {  ((((ap__b))))->link.next =
> ((struct apr_bucket *)((char  *)(((&(out)->list))) - ((long) (((char *)
> (&(((struct  apr_bucket*)((void *)0))->link))) - ((char *) ((void *)0))))));
> ((((ap__b))))->link.prev = (((struct apr_bucket *)((char  *)(((&(out)->list)))
> - ((long) (((char *) (&(((struct  apr_bucket*)((void *)0))->link))) - ((char *)
> ((void  *)0)))))))->link.prev; ((((struct apr_bucket *)((char
> *)(((&(out)->list))) - ((long) (((char *) (&(((struct  apr_bucket*)((void
> *)0))->link))) - ((char *) ((void  *)0)))))))->link.prev)->link.next =
> (((ap__b))); (((struct apr_bucket  *)((char *)(((&(out)->list))) - ((long)
> (((char *) (&(((struct  apr_bucket*)((void *)0))->link))) - ((char *) ((void
> *)0)))))))->link.prev = (((ap__b))); } while (0); ; } while (0);
>             } while (e != (&(in)->list)->next);
> -------------------------------

At least now it's a bit clearer why the no-strict-aliasing
optimization is getting confused ;-)

-- 
Joe Schaefer


Mime
View raw message