]> granicus.if.org Git - strace/commit
Untangle ifdef forest in sys_mmap64. No code changes
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 19 Aug 2011 14:11:07 +0000 (16:11 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 23 Aug 2011 10:53:01 +0000 (12:53 +0200)
commit31f9cb6f4889c4b3b28993eb259f20ef097b2b6a
treee3636de62afde9fff692e2498c21125779162e42
parent72a5848741a1d64badc1d88f7424cd9f357842f4
Untangle ifdef forest in sys_mmap64. No code changes

After careful analysis, it looks like !LINUX and ALPHA
pass all seven parameters in registers; and in all other cases
parameters are on stack (pointed to by tcp->u_arg[0]).
In light of this, reorganize ifdefs, making them simpler,
without changing any logic.
After this, it's apparent we use tcp->u_arg[4,5,6] and possibly
[7] without checking that it's valid to do so.
So far, just add a comment about this.

* mem.c (sys_mmap64): Rewrite ifdefs in a much simpler way.
Add comments about apparent bugs.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
mem.c