Re: IPv4 connections not being mapped into IPv6 sockets

Andreas Kleen (ak@muc.de)
Tue, 16 Sep 1997 17:51:38 +0200


>
> From: Andi Kleen <ak@muc.de>
> Date: 16 Sep 1997 14:24:43 +0200
>
> I'll check later if egcs fixes the problem and if not I'll send in
> a bug report.
>
> It would be great if you can produce a small test case, this makes the
> bug much easier to find.
>
> Just a side question, did %ebx have a valid value somewhere a bit
> further up from the asm snippet you showed? The problem might be that
> gcc believes that %ebx's contents are preserved even over volatile
> operations and function calls.

I looked a bit more into this: I think the problem was that gcc got into
register pressure while processing an return value and thrashed the
register variable sk in %ebx during this. Here is the code:

pushl %eax
pushl %edi
pushl %esi
call tcp_check_req ;; call other function
movl %eax,%ebx ;; gcc thrashes the register variable here.
addl $12,%esp

When I wanted to reproduce it I enabled the lock_sock()/release_sock()
code in the current version of tcp_v4_hnd_req() again (with some code
movements compared to the original buggy version). Now it compiles
correctly, I can't reproduce it anymore. I'll reenable the socket locking
soon in the CVS tree.

-Andi