Possible bug in sys_mmap64

Dmitry V. Levin ldv at altlinux.org
Fri Aug 19 16:07:38 UTC 2011


On Fri, Aug 19, 2011 at 04:23:51PM +0200, Denys Vlasenko wrote:
> I noticed particularly ugly ifdef forest in sys_mmap64 and decided
> to simplify it (see the commit below).
> 
> While looking at simplified version, I noticed that we seem to use
> tcp->u_arg[i] while we have to use u_arg[i].
> 
> It definitely looks like a bug to me.
> 
> However, I failed to make test program which invokes mmap64
> (need to try on x86-64), thus I hesitated to fix the bug.
> I only added a comment about it.
> 
> Dmitry, can you take a look? Maybe I'm confused...

You untangling of ifdefs is definitely correct.  Current sys_mmap64
code uses both u_arg[i] and tcp->u_arg[i] on LINUX && !ALPHA, which
looks very odd.  Need to have a look what's going on in the kernel.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20110819/fe7b1c4e/attachment.bin>


More information about the Strace-devel mailing list