[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#389225: marked as done (Bad anulling of instruction in delay slot (gcc 4.1.1-13, sparc, building kernel))



Your message dated Sat, 30 Sep 2006 13:45:41 +0200
with message-id <17694.22757.474822.844089@gargle.gargle.HOWL>
and subject line Bug#389225: correction
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gcc-4.1
Version: 4.1.1-13
Severity: important

The compiler generates bad code when building the kernel using
gcc-4.1. I'm no expert at Sparc assembler syntax, but it seems
to be wrong.

This is from the assembler list file generated by gcc-4.1 when
compiling (-O2) /usr/src/linux/net/netfilter/xt_MARK.c:

        .align 4
        .type   target_v1, #function
        .proc   016
target_v1:
        ldub    [%o5+4], %g1
        cmp     %g1, 1
be,a .LL9 ld [%o0], %g3

; Here the load of %g3 is anulled, resulting in %g3 being used
; without being defined at label .LL9

bgeu .LL16 cmp %g1, 2 ld [%o5], %g2
.LL15:
        ld      [%o0], %g3
ld [%g3+128], %g1
.LL18:
.LL19:
cmp %g1, %g2 be .LL17 mov -1, %o0 st %g2, [%g3+128]
.LL17:
jmp %o7+8
         nop
.LL16:
bne .LL15 mov 0, %g2
        ld      [%o0], %g3
ld [%o5], %g2 ld [%g3+128], %g1 b .LL18 or %g1, %g2, %g2

.LL9:
ld [%o5], %g2 ld [%g3+128], %g1

; Here we use %g3 without prior definition.

b .LL19 and %g1, %g2, %g2
        .size   target_v1, .-target_v1

This causes iptables to fail when adding targets that use the MARK
target.

Regards
/Daniel


--- End Message ---
--- Begin Message ---
David Miller writes:
> 
> I think the reporter's interpreation of the assembler
> code is incorrect.
> 
> If the branch to ".LL9" is taken, the load which initializes
> "%g3" is executed.
> 
> The annulment of the load only occurs if the branch is not taken,
> and for this snippet of code when the branch is not taken the
> ".LL9" label is never reached.

thanks for the feedback, closing the report.

  Matthias

--- End Message ---

Reply to: