Re: Endless loop in split_on_bdry() of library/parser_multipart.c?

Bojan Smojver <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
Quoting Joe Schaefer <[email protected]>:

> do { ... } while (0) is better- it's no longer a loop.

Instead of "while (e != APR_BRIGADE_FIRST(in))"?

> What is the assembler now?

Similar:

-----------------------------------------------
.L19:
         movq    40(%rsp), %rbp
.LVL27:
         movq    8(%rsp), %rdi
         movq    %r13, %rdx
.LVL28:
         movq    %r14, %rsi
.LVL29:
         subq    %r15, %rbp
         cmpq    %r13, %rbp
         cmovbe  %rbp, %rdx
         addq    %r15, %rdi
         call    strncmp
         testl   %eax, %eax
         je      .L47
         .loc 1 159 0
         testq   %r15, %r15
         je      .L27
.LBB3:
.LBB4:
         .loc 1 169 0
         movq    24(%rsp), %rax
         xorl    %r15d, %r15d
         movq    8(%rax), %rsi
.LVL30:
         cmpq    %rsi, %r12
         .p2align 4,,7
.L29:
         .loc 1 170 0
         movq    8(%r12), %rdx
.LVL31:
         .loc 1 171 0
         movq    8(%rsi), %rcx
         movq    (%rdx), %rax
         movq    %rax, (%rcx)
         movq    (%rdx), %rax
         .loc 1 172 0
         movq    %rbx, (%rdx)
         .loc 1 171 0
         movq    %rcx, 8(%rax)
         .loc 1 172 0
         movq    8(%rbx), %rax
         movq    %rax, 8(%rsi)
         movq    8(%rbx), %rax
         movq    %rdx, 8(%rbx)
         movq    %rsi, (%rax)
.LBE4:
         .loc 1 173 0
         jne     .L29
         jmp     .L19
-----------------------------------------------

-- 
Bojan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.