From: Nicholas Nethercote Date: Sun, 14 Nov 2004 17:58:27 +0000 (+0000) Subject: Converted a few more syscalls. X-Git-Tag: svn/VALGRIND_3_0_0~1320 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1dbf6e342feda80fbb137ea1346838b07b3e73ec;p=thirdparty%2Fvalgrind.git Converted a few more syscalls. Also split scalar into 6 pieces, to avoid hitting the 300 error limit. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2992 --- diff --git a/coregrind/vg_syscalls.c b/coregrind/vg_syscalls.c index 4245df77c6..5b35a22ae3 100644 --- a/coregrind/vg_syscalls.c +++ b/coregrind/vg_syscalls.c @@ -1271,10 +1271,18 @@ PRE(set_tid_address) PRINT("set_tid_address ( %p )", arg1); } -PRE(setresgid) +PREx(sys_setresgid16, 0) { - /* int setresgid(gid_t rgid, gid_t egid, gid_t sgid); */ - PRINT("setresgid ( %d, %d, %d )", arg1, arg2, arg3); + PRINT("sys_setresgid16 ( %d, %d, %d )", arg1, arg2, arg3); + PRE_REG_READ3(long, "setresgid16", + vki_old_gid_t, rgid, vki_old_gid_t, egid, vki_old_gid_t, sgid); +} + +PREx(sys_setresgid, 0) +{ + PRINT("sys_setresgid ( %d, %d, %d )", arg1, arg2, arg3); + PRE_REG_READ3(long, "setresgid", + vki_gid_t, rgid, vki_gid_t, egid, vki_gid_t, sgid); } PREx(sys_vhangup, 0) @@ -1616,12 +1624,6 @@ PREx(sys_nice, 0) PRE_REG_READ1(long, "nice", int, inc); } -PRE(setresgid32) -{ - /* int setresgid(gid_t rgid, gid_t egid, gid_t sgid); */ - PRINT("setresgid32 ( %d, %d, %d )", arg1, arg2, arg3); -} - PREx(sys_setfsuid, 0) { PRINT("sys_setfsuid ( %d )", arg1); @@ -1717,10 +1719,18 @@ PREx(sys_setregid16, 0) PRE_REG_READ2(long, "setregid16", vki_old_gid_t, rgid, vki_old_gid_t, egid); } -PRE(setresuid) +PREx(sys_setresuid16, 0) { - /* int setresuid(uid_t ruid, uid_t euid, uid_t suid); */ - PRINT("setresuid ( %d, %d, %d )", arg1, arg2, arg3); + PRINT("sys_setresuid16 ( %d, %d, %d )", arg1, arg2, arg3); + PRE_REG_READ3(long, "setresuid16", + vki_old_uid_t, ruid, vki_old_uid_t, euid, vki_old_uid_t, suid); +} + +PREx(sys_setresuid, 0) +{ + PRINT("sys_setresuid ( %d, %d, %d )", arg1, arg2, arg3); + PRE_REG_READ3(long, "setresuid", + vki_uid_t, ruid, vki_uid_t, euid, vki_uid_t, suid); } PREx(sys_setfsuid16, 0) @@ -2428,34 +2438,37 @@ PREx(sys_getppid, 0) PRE_REG_READ0(long, "getppid"); } -PRE(getresgid) +PREx(sys_getresgid16, 0) { - /* int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); */ - PRINT("getresgid ( %p, %p, %p )", arg1,arg2,arg3); - PRE_MEM_WRITE( "getresgid(rgid)", arg1, sizeof(vki_gid_t) ); - PRE_MEM_WRITE( "getresgid(egid)", arg2, sizeof(vki_gid_t) ); - PRE_MEM_WRITE( "getresgid(sgid)", arg3, sizeof(vki_gid_t) ); + PRINT("sys_getresgid16 ( %p, %p, %p )", arg1,arg2,arg3); + PRE_REG_READ3(long, "getresgid16", + vki_old_gid_t *, rgid, vki_old_gid_t *, egid, + vki_old_gid_t *, sgid); + PRE_MEM_WRITE( "getresgid16(rgid)", arg1, sizeof(vki_old_gid_t) ); + PRE_MEM_WRITE( "getresgid16(egid)", arg2, sizeof(vki_old_gid_t) ); + PRE_MEM_WRITE( "getresgid16(sgid)", arg3, sizeof(vki_old_gid_t) ); } -POST(getresgid) +POSTx(sys_getresgid16) { if (res == 0) { - POST_MEM_WRITE( arg1, sizeof(vki_gid_t) ); - POST_MEM_WRITE( arg2, sizeof(vki_gid_t) ); - POST_MEM_WRITE( arg3, sizeof(vki_gid_t) ); + POST_MEM_WRITE( arg1, sizeof(vki_old_gid_t) ); + POST_MEM_WRITE( arg2, sizeof(vki_old_gid_t) ); + POST_MEM_WRITE( arg3, sizeof(vki_old_gid_t) ); } } -PRE(getresgid32) +PREx(sys_getresgid, 0) { - /* int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); */ - PRINT("getresgid32 ( %p, %p, %p )", arg1,arg2,arg3); - PRE_MEM_WRITE( "getresgid32(rgid)", arg1, sizeof(vki_gid_t) ); - PRE_MEM_WRITE( "getresgid32(egid)", arg2, sizeof(vki_gid_t) ); - PRE_MEM_WRITE( "getresgid32(sgid)", arg3, sizeof(vki_gid_t) ); + PRINT("sys_getresgid ( %p, %p, %p )", arg1,arg2,arg3); + PRE_REG_READ3(long, "getresgid", + vki_gid_t *, rgid, vki_gid_t *, egid, vki_gid_t *, sgid); + PRE_MEM_WRITE( "getresgid(rgid)", arg1, sizeof(vki_gid_t) ); + PRE_MEM_WRITE( "getresgid(egid)", arg2, sizeof(vki_gid_t) ); + PRE_MEM_WRITE( "getresgid(sgid)", arg3, sizeof(vki_gid_t) ); } -POST(getresgid32) +POSTx(sys_getresgid) { if (res == 0) { POST_MEM_WRITE( arg1, sizeof(vki_gid_t) ); @@ -2464,34 +2477,37 @@ POST(getresgid32) } } -PRE(getresuid) +PREx(sys_getresuid16, 0) { - /* int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); */ - PRINT("getresuid ( %p, %p, %p )", arg1,arg2,arg3); - PRE_MEM_WRITE( "getresuid(ruid)", arg1, sizeof(vki_uid_t) ); - PRE_MEM_WRITE( "getresuid(euid)", arg2, sizeof(vki_uid_t) ); - PRE_MEM_WRITE( "getresuid(suid)", arg3, sizeof(vki_uid_t) ); + PRINT("sys_getresuid16 ( %p, %p, %p )", arg1,arg2,arg3); + PRE_REG_READ3(long, "getresuid16", + vki_old_uid_t *, ruid, vki_old_uid_t *, euid, + vki_old_uid_t *, suid); + PRE_MEM_WRITE( "getresuid16(ruid)", arg1, sizeof(vki_old_uid_t) ); + PRE_MEM_WRITE( "getresuid16(euid)", arg2, sizeof(vki_old_uid_t) ); + PRE_MEM_WRITE( "getresuid16(suid)", arg3, sizeof(vki_old_uid_t) ); } -POST(getresuid) +POSTx(sys_getresuid16) { if (res == 0) { - POST_MEM_WRITE( arg1, sizeof(vki_uid_t) ); - POST_MEM_WRITE( arg2, sizeof(vki_uid_t) ); - POST_MEM_WRITE( arg3, sizeof(vki_uid_t) ); + POST_MEM_WRITE( arg1, sizeof(vki_old_uid_t) ); + POST_MEM_WRITE( arg2, sizeof(vki_old_uid_t) ); + POST_MEM_WRITE( arg3, sizeof(vki_old_uid_t) ); } } -PRE(getresuid32) +PREx(sys_getresuid, 0) { - /* int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); */ - PRINT("getresuid32 ( %p, %p, %p )", arg1,arg2,arg3); - PRE_MEM_WRITE( "getresuid32(ruid)", arg1, sizeof(vki_uid_t) ); - PRE_MEM_WRITE( "getresuid32(euid)", arg2, sizeof(vki_uid_t) ); - PRE_MEM_WRITE( "getresuid32(suid)", arg3, sizeof(vki_uid_t) ); + PRINT("sys_getresuid ( %p, %p, %p )", arg1,arg2,arg3); + PRE_REG_READ3(long, "getresuid", + vki_uid_t *, ruid, vki_uid_t *, euid, vki_uid_t *, suid); + PRE_MEM_WRITE( "getresuid(ruid)", arg1, sizeof(vki_uid_t) ); + PRE_MEM_WRITE( "getresuid(euid)", arg2, sizeof(vki_uid_t) ); + PRE_MEM_WRITE( "getresuid(suid)", arg3, sizeof(vki_uid_t) ); } -POST(getresuid32) +POSTx(sys_getresuid) { if (res == 0) { POST_MEM_WRITE( arg1, sizeof(vki_uid_t) ); @@ -4947,12 +4963,6 @@ PREx(sys_setregid, 0) PRE_REG_READ2(long, "setregid", vki_gid_t, rgid, vki_gid_t, egid); } -PRE(setresuid32) -{ - /* int setresuid(uid_t ruid, uid_t euid, uid_t suid); */ - PRINT("setresuid32(?) ( %d, %d, %d )", arg1, arg2, arg3); -} - PREx(sys_setreuid16, 0) { PRINT("setreuid16 ( 0x%x, 0x%x )", arg1, arg2); @@ -6461,16 +6471,16 @@ static const struct sys_info sys_info[] = { // (__NR_sched_rr_get_interval, sys_sched_rr_get_interval), // 161 * SYSBA(__NR_nanosleep, sys_nanosleep, MayBlock|PostOnFail), // 162 * SYSB_(__NR_mremap, sys_mremap, Special), // 163 * - SYSB_(__NR_setresuid, sys_setresuid16, 0), // 164 ## + SYSX_(__NR_setresuid, sys_setresuid16), // 164 ## (non-standard) - SYSBA(__NR_getresuid, sys_getresuid16, 0), // 165 ## + SYSXY(__NR_getresuid, sys_getresuid16), // 165 ## L // (__NR_vm86, sys_vm86), // 166 (x86) L SYSX_(__NR_query_module, sys_ni_syscall), // 167 * P -- unimplemented SYSBA(__NR_poll, sys_poll, MayBlock), // 168 * // (__NR_nfsservctl, sys_nfsservctl), // 169 * L - SYSB_(__NR_setresgid, sys_setresgid16, 0), // 170 ## - SYSBA(__NR_getresgid, sys_getresgid16, 0), // 171 ## + SYSX_(__NR_setresgid, sys_setresgid16), // 170 ## (non-standard) + SYSXY(__NR_getresgid, sys_getresgid16), // 171 ## L SYSB_(__NR_prctl, sys_prctl, MayBlock), // 172 * // (__NR_rt_sigreturn, sys_rt_sigreturn), // 173 (x86) () SYSXY(__NR_rt_sigaction, sys_rt_sigaction), // 174 (x86) () @@ -6515,11 +6525,11 @@ static const struct sys_info sys_info[] = { SYSXY(__NR_getgroups32, sys_getgroups), // 205 * P SYSX_(__NR_setgroups32, sys_setgroups), // 206 * almost-P SYSX_(__NR_fchown32, sys_fchown), // 207 * (SVr4,BSD4.3) - SYSB_(__NR_setresuid32, sys_setresuid, 0), // 208 * - SYSBA(__NR_getresuid32, sys_getresuid, 0), // 209 * + SYSX_(__NR_setresuid32, sys_setresuid), // 208 * (non-standard) + SYSXY(__NR_getresuid32, sys_getresuid), // 209 * L - SYSB_(__NR_setresgid32, sys_setresgid, 0), // 210 * - SYSBA(__NR_getresgid32, sys_getresgid, 0), // 211 * + SYSX_(__NR_setresgid32, sys_setresgid), // 210 * (non-standard) + SYSXY(__NR_getresgid32, sys_getresgid), // 211 * L SYSX_(__NR_chown32, sys_chown), // 212 * P SYSX_(__NR_setuid32, sys_setuid), // 213 * SYSX_(__NR_setgid32, sys_setgid), // 214 * (SVr4,SVID) diff --git a/memcheck/tests/.cvsignore b/memcheck/tests/.cvsignore index abd462a97a..63e70b7c4a 100644 --- a/memcheck/tests/.cvsignore +++ b/memcheck/tests/.cvsignore @@ -49,6 +49,11 @@ realloc1 realloc2 realloc3 scalar +scalar2 +scalar3 +scalar4 +scalar5 +scalar6 scalar_fork scalar_supp scalar_vfork diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 2d7bdf42ee..5f7ec32b13 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -53,9 +53,14 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ realloc1.stderr.exp realloc1.vgtest \ realloc2.stderr.exp realloc2.vgtest \ realloc3.stderr.exp realloc3.vgtest \ - scalar.stderr.exp scalar.vgtest scalar.supp \ + scalar.stderr.exp scalar.vgtest \ + scalar2.stderr.exp scalar2.vgtest \ + scalar3.stderr.exp scalar3.vgtest \ + scalar4.stderr.exp scalar4.vgtest \ + scalar5.stderr.exp scalar5.vgtest \ + scalar6.stderr.exp scalar6.vgtest \ scalar_fork.stderr.exp scalar_fork.vgtest \ - scalar_supp.stderr.exp scalar_supp.vgtest \ + scalar_supp.stderr.exp scalar_supp.vgtest scalar_supp.supp \ scalar_vfork.stderr.exp scalar_vfork.vgtest \ sigaltstack.stderr.exp sigaltstack.vgtest \ signal2.stderr.exp \ @@ -85,8 +90,9 @@ check_PROGRAMS = \ memalign_test memalign2 memcmptest mempool mmaptest \ nanoleak new_nothrow \ null_socket overlap \ - realloc1 realloc2 realloc3 scalar scalar_fork \ - scalar_supp scalar_vfork sigaltstack signal2 \ + realloc1 realloc2 realloc3 \ + scalar scalar2 scalar3 scalar4 scalar5 scalar6 \ + scalar_fork scalar_supp scalar_vfork sigaltstack signal2 \ str_tester supp1 supp2 suppfree \ trivialleak weirdioctl \ mismatches new_override metadata threadederrno \ @@ -139,6 +145,11 @@ realloc1_SOURCES = realloc1.c realloc2_SOURCES = realloc2.c realloc3_SOURCES = realloc3.c scalar_SOURCES = scalar.c +scalar2_SOURCES = scalar2.c +scalar3_SOURCES = scalar3.c +scalar4_SOURCES = scalar4.c +scalar5_SOURCES = scalar5.c +scalar6_SOURCES = scalar6.c scalar_fork_SOURCES = scalar_fork.c scalar_supp_SOURCES = scalar_supp.c scalar_vfork_SOURCES = scalar_vfork.c diff --git a/memcheck/tests/scalar.c b/memcheck/tests/scalar.c index 1994e6c9ff..c9eb8f1cc6 100644 --- a/memcheck/tests/scalar.c +++ b/memcheck/tests/scalar.c @@ -7,6 +7,8 @@ int main(void) long x0 = px[0]; // All __NR_xxx numbers are taken from x86 + + // 0--49 // __NR_restart_syscall 1 XXX ??? // (see below) @@ -205,937 +207,6 @@ int main(void) GO(__NR_geteuid, "0e"); SY(__NR_geteuid); - // __NR_getegid 50 --> sys_getegid16() - GO(__NR_getegid, "0e"); - SY(__NR_getegid); - - // __NR_acct 51 --> sys_acct() - GO(__NR_acct, "1s 1m"); - SY(__NR_acct, x0); - - // __NR_umount2 52 --> sys_umount() - GO(__NR_umount2, "2s 1m"); - SY(__NR_umount2, x0, x0); - - // __NR_lock 53 --> sys_ni_syscall() - GO(__NR_lock, "0e"); - SY(__NR_lock); - - // __NR_ioctl 54 --> sys_ioctl() - #include - GO(__NR_ioctl, "3s 1m"); - SY(__NR_ioctl, x0, x0+TCSETS, x0); - - // __NR_fcntl 55 --> sys_fcntl() - GO(__NR_fcntl, "3s 0m"); - SY(__NR_fcntl, x0, x0, x0); - - // __NR_mpx 56 --> sys_ni_syscall() - GO(__NR_mpx, "0e"); - SY(__NR_mpx); - - // __NR_setpgid 57 - GO(__NR_setpgid, "2s 0m"); - SY(__NR_setpgid, x0, x0); - - // __NR_ulimit 58 --> sys_ni_syscall() - GO(__NR_ulimit, "0e"); - SY(__NR_ulimit); - - // __NR_oldolduname 59 - // (obsolete, not handled by Valgrind) - - // __NR_umask 60 - GO(__NR_umask, "1s 0m"); - SY(__NR_umask, x0); - - // __NR_chroot 61 - GO(__NR_chroot, "1s 1m"); - SY(__NR_chroot, x0); - - // __NR_ustat 62 - // (deprecated, not handled by Valgrind) - - // __NR_dup2 63 - GO(__NR_dup2, "2s 0m"); - SY(__NR_dup2, x0, x0); - - // __NR_getppid 64 --> sys_getppid() - GO(__NR_getppid, "0e"); - SY(__NR_getppid); - - // __NR_getpgrp 65 --> sys_getpgrp() - GO(__NR_getpgrp, "0e"); - SY(__NR_getpgrp); - - // __NR_setsid 66 --> sys_setsid() - GO(__NR_setsid, "0e"); - SY(__NR_setsid); - - // __NR_sigaction 67 --> sys_sigaction() - GO(__NR_sigaction, "3s 2m"); - SY(__NR_sigaction, x0, x0+1, x0+1); - - // __NR_sgetmask 68 - // (Not yet handled by Valgrind) - - // __NR_ssetmask 69 - // (Not yet handled by Valgrind) - - // __NR_setreuid 70 --> sys_setreuid16() - GO(__NR_setreuid, "2s 0m"); - SY(__NR_setreuid, x0, x0); - - // __NR_setregid 71 --> sys_setregid16() - GO(__NR_setregid, "2s 0m"); - SY(__NR_setregid, x0, x0); - - // __NR_sigsuspend 72 --> sys_sigsuspend() - // XXX: how do you use this function? -// GO(__NR_sigsuspend, ".s .m"); -// SY(__NR_sigsuspend); - - // __NR_sigpending 73 --> sys_sigpending() - GO(__NR_sigpending, "1s 1m"); - SY(__NR_sigpending, x0); - - // __NR_sethostname 74 - // (Not yet handled by Valgrind) - - // __NR_setrlimit 75 --> sys_setrlimit() - GO(__NR_setrlimit, "2s 1m"); - SY(__NR_setrlimit, x0, x0); - - // __NR_getrlimit 76 - GO(__NR_getrlimit, "2s 1m"); - SY(__NR_getrlimit, x0, x0); - - // __NR_getrusage 77 - GO(__NR_getrusage, "2s 1m"); - SY(__NR_getrusage, x0, x0); - - // __NR_gettimeofday 78 --> sys_gettimeofday() - GO(__NR_gettimeofday, "2s 2m"); - SY(__NR_gettimeofday, x0, x0+1); - - // __NR_settimeofday 79 --> sys_settimeofday() - GO(__NR_settimeofday, "2s 2m"); - SY(__NR_settimeofday, x0, x0+1); - - // __NR_getgroups 80 --> sys_getgroups16() - GO(__NR_getgroups, "2s 1m"); - SY(__NR_getgroups, x0+1, x0+1); - - // __NR_setgroups 81 --> sys_setgroups16() - GO(__NR_setgroups, "2s 1m"); - SY(__NR_setgroups, x0+1, x0+1); - - // __NR_select 82 --> old_select() - { - long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 }; - GO(__NR_select, "1s 4m"); - SY(__NR_select, args+x0); - } - - // __NR_symlink 83 - //GO(__NR_symlink, ".s .m"); - //SY(__NR_symlink); - - // __NR_oldlstat 84 - // (obsolete, not handled by Valgrind) - - // __NR_readlink 85 - //GO(__NR_readlink, ".s .m"); - //SY(__NR_readlink); - - // __NR_uselib 86 - // (Not yet handled by Valgrind) - - // __NR_swapon 87 - // (Not yet handled by Valgrind) - - // __NR_reboot 88 - // (Not yet handled by Valgrind) - - // __NR_readdir 89 - // (superseded, not handled by Valgrind) - - // __NR_mmap 90 - //GO(__NR_mmap, ".s .m"); - //SY(__NR_mmap); - - // __NR_munmap 91 - //GO(__NR_munmap, ".s .m"); - //SY(__NR_munmap); - - // __NR_truncate 92 - //GO(__NR_truncate, ".s .m"); - //SY(__NR_truncate); - - // __NR_ftruncate 93 - //GO(__NR_ftruncate, ".s .m"); - //SY(__NR_ftruncate); - - // __NR_fchmod 94 - //GO(__NR_fchmod, ".s .m"); - //SY(__NR_fchmod); - - // __NR_fchown 95 --> sys_fchown16 - GO(__NR_fchown, "3s 0m"); - SY(__NR_fchown, x0, x0, x0); - - // __NR_getpriority 96 - //GO(__NR_getpriority, ".s .m"); - //SY(__NR_getpriority); - - // __NR_setpriority 97 - //GO(__NR_setpriority, ".s .m"); - //SY(__NR_setpriority); - - // __NR_profil 98 - //GO(__NR_profil, ".s .m"); - //SY(__NR_profil); - - // __NR_statfs 99 - //GO(__NR_statfs, ".s .m"); - //SY(__NR_statfs); - - // __NR_fstatfs 100 - //GO(__NR_fstatfs, ".s .m"); - //SY(__NR_fstatfs); - - // __NR_ioperm 101 - //GO(__NR_ioperm, ".s .m"); - //SY(__NR_ioperm); - - // __NR_socketcall 102 - //GO(__NR_socketcall, ".s .m"); - //SY(__NR_socketcall); - - // __NR_syslog 103 - //GO(__NR_syslog, ".s .m"); - //SY(__NR_syslog); - - // __NR_setitimer 104 - //GO(__NR_setitimer, ".s .m"); - //SY(__NR_setitimer); - - // __NR_getitimer 105 - //GO(__NR_getitimer, ".s .m"); - //SY(__NR_getitimer); - - // __NR_stat 106 --> sys_newstat() - GO(__NR_stat, "2s 2m"); - SY(__NR_stat, x0, x0); - - // __NR_lstat 107 --> sys_newlstat() - GO(__NR_lstat, "2s 2m"); - SY(__NR_lstat, x0, x0); - - // __NR_fstat 108 --> sys_newfstat() - GO(__NR_fstat, "2s 1m"); - SY(__NR_fstat, x0, x0); - - // __NR_olduname 109 - // (obsolete, not handled by Valgrind) - - // __NR_iopl 110 - //GO(__NR_iopl, ".s .m"); - //SY(__NR_iopl); - - // __NR_vhangup 111 --> sys_vhangup() - GO(__NR_vhangup, "0e"); - SY(__NR_vhangup); - - // __NR_idle 112 --> sys_ni_syscall() - GO(__NR_idle, "0e"); - SY(__NR_idle); - - // __NR_vm86old 113 - //GO(__NR_vm86old, ".s .m"); - //SY(__NR_vm86old); - - // __NR_wait4 114 - //GO(__NR_wait4, ".s .m"); - //SY(__NR_wait4); - - // __NR_swapoff 115 - //GO(__NR_swapoff, ".s .m"); - //SY(__NR_swapoff); - - // __NR_sysinfo 116 - //GO(__NR_sysinfo, ".s .m"); - //SY(__NR_sysinfo); - - // __NR_ipc 117 - //GO(__NR_ipc, ".s .m"); - //SY(__NR_ipc); - - // __NR_fsync 118 - //GO(__NR_fsync, ".s .m"); - //SY(__NR_fsync); - - // __NR_sigreturn 119 - //GO(__NR_sigreturn, ".s .m"); - //SY(__NR_sigreturn); - - // __NR_clone 120 - //GO(__NR_clone, ".s .m"); - //SY(__NR_clone); - - // __NR_setdomainname 121 - //GO(__NR_setdomainname, ".s .m"); - //SY(__NR_setdomainname); - - // __NR_uname 122 - GO(__NR_uname, "1s 1m"); - SY(__NR_uname, x0); - - // __NR_modify_ldt 123 - //GO(__NR_modify_ldt, ".s .m"); - //SY(__NR_modify_ldt); - - // __NR_adjtimex 124 - //GO(__NR_adjtimex, ".s .m"); - //SY(__NR_adjtimex); - - // __NR_mprotect 125 - //GO(__NR_mprotect, ".s .m"); - //SY(__NR_mprotect); - - // __NR_sigprocmask 126 - //GO(__NR_sigprocmask, ".s .m"); - //SY(__NR_sigprocmask); - - // __NR_create_module 127 --> sys_ni_syscall() - GO(__NR_create_module, "0e"); - SY(__NR_create_module); - - // __NR_init_module 128 - //GO(__NR_init_module, ".s .m"); - //SY(__NR_init_module); - - // __NR_delete_module 129 - //GO(__NR_delete_module, ".s .m"); - //SY(__NR_delete_module); - - // __NR_get_kernel_syms 130 --> sys_ni_syscall() - GO(__NR_get_kernel_syms, "0e"); - SY(__NR_get_kernel_syms); - - // __NR_quotactl 131 - //GO(__NR_quotactl, ".s .m"); - //SY(__NR_quotactl); - - // __NR_getpgid 132 - //GO(__NR_getpgid, ".s .m"); - //SY(__NR_getpgid); - - // __NR_fchdir 133 - //GO(__NR_fchdir, ".s .m"); - //SY(__NR_fchdir); - - // __NR_bdflush 134 - //GO(__NR_bdflush, ".s .m"); - //SY(__NR_bdflush); - - // __NR_sysfs 135 - //GO(__NR_sysfs, ".s .m"); - //SY(__NR_sysfs); - - // __NR_personality 136 - //GO(__NR_personality, ".s .m"); - //SY(__NR_personality); - - // __NR_afs_syscall 137 --> sys_ni_syscall() - GO(__NR_afs_syscall, "0e"); - SY(__NR_afs_syscall); - - // __NR_setfsuid 138 - GO(__NR_setfsuid, "1s 0m"); - SY(__NR_setfsuid, x0); - - // __NR_setfsgid 139 - GO(__NR_setfsgid, "1s 0m"); - SY(__NR_setfsgid, x0); - - // __NR__llseek 140 - //GO(__NR__llseek, ".s .m"); - //SY(__NR__llseek); - - // __NR_getdents 141 - //GO(__NR_getdents, ".s .m"); - //SY(__NR_getdents); - - // __NR__newselect 142 --> sys_select() - GO(__NR__newselect, "5s 4m"); - SY(__NR__newselect, x0+8, x0+0xffffffff, x0+1, x0+1, x0+1); - - // __NR_flock 143 - //GO(__NR_flock, ".s .m"); - //SY(__NR_flock); - - // __NR_msync 144 - //GO(__NR_msync, ".s .m"); - //SY(__NR_msync); - - // __NR_readv 145 - //GO(__NR_readv, ".s .m"); - //SY(__NR_readv); - - // __NR_writev 146 - //GO(__NR_writev, ".s .m"); - //SY(__NR_writev); - - // __NR_getsid 147 - //GO(__NR_getsid, ".s .m"); - //SY(__NR_getsid); - - // __NR_fdatasync 148 - //GO(__NR_fdatasync, ".s .m"); - //SY(__NR_fdatasync); - - // __NR__sysctl 149 - //GO(__NR__sysctl, ".s .m"); - //SY(__NR__sysctl); - - // __NR_mlock 150 - //GO(__NR_mlock, ".s .m"); - //SY(__NR_mlock); - - // __NR_munlock 151 - //GO(__NR_munlock, ".s .m"); - //SY(__NR_munlock); - - // __NR_mlockall 152 - //GO(__NR_mlockall, ".s .m"); - //SY(__NR_mlockall); - - // __NR_munlockall 153 --> sys_munlockall() - GO(__NR_munlockall, "0e"); - SY(__NR_munlockall); - - // __NR_sched_setparam 154 - //GO(__NR_sched_setparam, ".s .m"); - //SY(__NR_sched_setparam); - - // __NR_sched_getparam 155 - //GO(__NR_sched_getparam, ".s .m"); - //SY(__NR_sched_getparam); - - // __NR_sched_setscheduler 156 - //GO(__NR_sched_setscheduler, ".s .m"); - //SY(__NR_sched_setscheduler); - - // __NR_sched_getscheduler 157 - //GO(__NR_sched_getscheduler, ".s .m"); - //SY(__NR_sched_getscheduler); - - // __NR_sched_yield 158 - //GO(__NR_sched_yield, ".s .m"); - //SY(__NR_sched_yield); - - // __NR_sched_get_priority_max 159 - //GO(__NR_sched_get_priority_max, ".s .m"); - //SY(__NR_sched_get_priority_max); - - // __NR_sched_get_priority_min 160 - //GO(__NR_sched_get_priority_min, ".s .m"); - //SY(__NR_sched_get_priority_min); - - // __NR_sched_rr_get_interval 161 - //GO(__NR_sched_rr_get_interval, ".s .m"); - //SY(__NR_sched_rr_get_interval); - - // __NR_nanosleep 162 - //GO(__NR_nanosleep, ".s .m"); - //SY(__NR_nanosleep); - - // __NR_mremap 163 - //GO(__NR_mremap, ".s .m"); - //SY(__NR_mremap); - - // __NR_setresuid 164 - //GO(__NR_setresuid, ".s .m"); - //SY(__NR_setresuid); - - // __NR_getresuid 165 - //GO(__NR_getresuid, ".s .m"); - //SY(__NR_getresuid); - - // __NR_vm86 166 - //GO(__NR_vm86, ".s .m"); - //SY(__NR_vm86); - - // __NR_query_module 167 --> sys_ni_syscall() - GO(__NR_query_module, "0e"); - SY(__NR_query_module); - - // __NR_poll 168 - //GO(__NR_poll, ".s .m"); - //SY(__NR_poll); - - // __NR_nfsservctl 169 - //GO(__NR_nfsservctl, ".s .m"); - //SY(__NR_nfsservctl); - - // __NR_setresgid 170 - //GO(__NR_setresgid, ".s .m"); - //SY(__NR_setresgid); - - // __NR_getresgid 171 - //GO(__NR_getresgid, ".s .m"); - //SY(__NR_getresgid); - - // __NR_prctl 172 - //GO(__NR_prctl, ".s .m"); - //SY(__NR_prctl); - - // __NR_rt_sigreturn 173 - //GO(__NR_rt_sigreturn, ".s .m"); - //SY(__NR_rt_sigreturn); - - // __NR_rt_sigaction 174 --> sys_rt_sigaction() - GO(__NR_rt_sigaction, "4s 2m"); - SY(__NR_rt_sigaction, x0, x0+1, x0+1, x0); - - // __NR_rt_sigprocmask 175 - //GO(__NR_rt_sigprocmask, ".s .m"); - //SY(__NR_rt_sigprocmask); - - // __NR_rt_sigpending 176 - //GO(__NR_rt_sigpending, ".s .m"); - //SY(__NR_rt_sigpending); - - // __NR_rt_sigtimedwait 177 - //GO(__NR_rt_sigtimedwait, ".s .m"); - //SY(__NR_rt_sigtimedwait); - - // __NR_rt_sigqueueinfo 178 - //GO(__NR_rt_sigqueueinfo, ".s .m"); - //SY(__NR_rt_sigqueueinfo); - - // __NR_rt_sigsuspend 179 - //GO(__NR_rt_sigsuspend, ".s .m"); - //SY(__NR_rt_sigsuspend); - - // __NR_pread64 180 - //GO(__NR_pread64, ".s .m"); - //SY(__NR_pread64); - - // __NR_pwrite64 181 - //GO(__NR_pwrite64, ".s .m"); - //SY(__NR_pwrite64); - - // __NR_chown 182 --> sys_chown16() - GO(__NR_chown, "3s 1m"); - SY(__NR_chown, x0, x0, x0); - - // __NR_getcwd 183 - //GO(__NR_getcwd, ".s .m"); - //SY(__NR_getcwd); - - // __NR_capget 184 - //GO(__NR_capget, ".s .m"); - //SY(__NR_capget); - - // __NR_capset 185 - //GO(__NR_capset, ".s .m"); - //SY(__NR_capset); - - // __NR_sigaltstack 186 - //GO(__NR_sigaltstack, ".s .m"); - //SY(__NR_sigaltstack); - - // __NR_sendfile 187 - //GO(__NR_sendfile, ".s .m"); - //SY(__NR_sendfile); - - // __NR_getpmsg 188 - //GO(__NR_getpmsg, ".s .m"); - //SY(__NR_getpmsg); - - // __NR_putpmsg 189 - //GO(__NR_putpmsg, ".s .m"); - //SY(__NR_putpmsg); - - // __NR_vfork 190 - //GO(__NR_vfork, ".s .m"); - //SY(__NR_vfork); - - // __NR_ugetrlimit 191 - GO(__NR_ugetrlimit, "2s 1m"); - SY(__NR_ugetrlimit, x0, x0); - - // __NR_mmap2 192 - //GO(__NR_mmap2, ".s .m"); - //SY(__NR_mmap2); - - // __NR_truncate64 193 - //GO(__NR_truncate64, ".s .m"); - //SY(__NR_truncate64); - - // __NR_ftruncate64 194 - //GO(__NR_ftruncate64, ".s .m"); - //SY(__NR_ftruncate64); - - // __NR_stat64 195 - GO(__NR_stat64, "2s 2m"); - SY(__NR_stat64, x0, x0); - - // __NR_lstat64 196 - GO(__NR_lstat64, "2s 2m"); - SY(__NR_lstat64, x0, x0); - - // __NR_fstat64 197 - GO(__NR_fstat64, "2s 1m"); - SY(__NR_fstat64, x0, x0); - - // __NR_lchown32 198 --> sys_chown() - GO(__NR_lchown32, "3s 1m"); - SY(__NR_lchown32, x0, x0, x0); - - // __NR_getuid32 199 --> sys_getuid() - GO(__NR_getuid32, "0e"); - SY(__NR_getuid32); - - // __NR_getgid32 200 --> sys_getgid() - GO(__NR_getgid32, "0e"); - SY(__NR_getgid32); - - // __NR_geteuid32 201 --> sys_geteuid() - GO(__NR_geteuid32, "0e"); - SY(__NR_geteuid32); - - // __NR_getegid32 202 --> sys_getegid() - GO(__NR_getegid32, "0e"); - SY(__NR_getegid32); - - // __NR_setreuid32 203 - GO(__NR_setreuid32, "2s 0m"); - SY(__NR_setreuid32, x0, x0); - - // __NR_setregid32 204 - GO(__NR_setregid32, "2s 0m"); - SY(__NR_setregid32, x0, x0); - - // __NR_getgroups32 205 --> sys_getgroups() - GO(__NR_getgroups32, "2s 1m"); - SY(__NR_getgroups32, x0+1, x0+1); - - // __NR_setgroups32 206 --> sys_setgroups() - GO(__NR_setgroups32, "2s 1m"); - SY(__NR_setgroups32, x0+1, x0+1); - - // __NR_fchown32 207 --> sys_fchown() - GO(__NR_fchown32, "3s 0m"); - SY(__NR_fchown32, x0, x0, x0); - - // __NR_setresuid32 208 - //GO(__NR_setresuid32, ".s .m"); - //SY(__NR_setresuid32); - - // __NR_getresuid32 209 - //GO(__NR_getresuid32, ".s .m"); - //SY(__NR_getresuid32); - - // __NR_setresgid32 210 - //GO(__NR_setresgid32, ".s .m"); - //SY(__NR_setresgid32); - - // __NR_getresgid32 211 - //GO(__NR_getresgid32, ".s .m"); - //SY(__NR_getresgid32); - - // __NR_chown32 212 --> sys_chown() - GO(__NR_chown32, "3s 1m"); - SY(__NR_chown32, x0, x0, x0); - - // __NR_setuid32 213 --> sys_setuid() - GO(__NR_setuid32, "1s 0m"); - SY(__NR_setuid32, x0); - - // __NR_setgid32 214 - GO(__NR_setgid32, "1s 0m"); - SY(__NR_setgid32, x0); - - // __NR_setfsuid32 215 --> sys_setfsuid() - GO(__NR_setfsuid32, "1s 0m"); - SY(__NR_setfsuid32, x0); - - // __NR_setfsgid32 216 --> sys_setfsgid() - GO(__NR_setfsgid32, "1s 0m"); - SY(__NR_setfsgid32, x0); - - // __NR_pivot_root 217 - //GO(__NR_pivot_root, ".s .m"); - //SY(__NR_pivot_root); - - // __NR_mincore 218 - //GO(__NR_mincore, ".s .m"); - //SY(__NR_mincore); - - // __NR_madvise 219 - //GO(__NR_madvise, ".s .m"); - //SY(__NR_madvise); - - // __NR_getdents64 220 - //GO(__NR_getdents64, ".s .m"); - //SY(__NR_getdents64); - - // __NR_fcntl64 221 - //GO(__NR_fcntl64, ".s .m"); - //SY(__NR_fcntl64); - - // 222 --> sys_ni_syscall() - GO(222, "0e"); - SY(222); - - // 223 --> sys_ni_syscall() - GO(223, "0e"); - SY(223); - - // __NR_gettid 224 - //GO(__NR_gettid, ".s .m"); - //SY(__NR_gettid); - - // __NR_readahead 225 - //GO(__NR_readahead, ".s .m"); - //SY(__NR_readahead); - - // __NR_setxattr 226 --> sys_xattr() - GO(__NR_setxattr, "5s 3m"); - SY(__NR_setxattr, x0, x0, x0, x0+1, x0); - - // __NR_lsetxattr 227 --> sys_lsetxattr() - GO(__NR_lsetxattr, "5s 3m"); - SY(__NR_lsetxattr, x0, x0, x0, x0+1, x0); - - // __NR_fsetxattr 228 --> sys_fsetxattr() - GO(__NR_fsetxattr, "5s 2m"); - SY(__NR_fsetxattr, x0, x0, x0, x0+1, x0); - - // __NR_getxattr 229 --> sys_getxattr() - GO(__NR_getxattr, "4s 3m"); - SY(__NR_getxattr, x0, x0, x0, x0+1); - - // __NR_lgetxattr 230 --> sys_lgetxattr() - GO(__NR_lgetxattr, "4s 3m"); - SY(__NR_lgetxattr, x0, x0, x0, x0+1); - - // __NR_fgetxattr 231 --> sys_fgetxattr() - GO(__NR_fgetxattr, "4s 2m"); - SY(__NR_fgetxattr, x0, x0, x0, x0+1); - - // __NR_listxattr 232 --> sys_listxattr() - GO(__NR_listxattr, "3s 2m"); - SY(__NR_listxattr, x0, x0, x0+1); - - // __NR_llistxattr 233 --> sys_llistxattr() - GO(__NR_llistxattr, "3s 2m"); - SY(__NR_llistxattr, x0, x0, x0+1); - - // __NR_flistxattr 234 --> sys_flistxattr() - GO(__NR_flistxattr, "3s 1m"); - SY(__NR_flistxattr, x0, x0, x0+1); - - // __NR_removexattr 235 --> sys_removexattr() - GO(__NR_removexattr, "2s 2m"); - SY(__NR_removexattr, x0, x0); - - // __NR_lremovexattr 236 --> sys_lremovexattr() - GO(__NR_lremovexattr, "2s 2m"); - SY(__NR_lremovexattr, x0, x0); - - // __NR_fremovexattr 237 --> sys_fremovexattr() - GO(__NR_fremovexattr, "2s 1m"); - SY(__NR_fremovexattr, x0, x0); - - // __NR_tkill 238 - //GO(__NR_tkill, ".s .m"); - //SY(__NR_tkill); - - // __NR_sendfile64 239 - //GO(__NR_sendfile64, ".s .m"); - //SY(__NR_sendfile64); - - // __NR_futex 240 - //GO(__NR_futex, ".s .m"); - //SY(__NR_futex); - - // __NR_sched_setaffinity 241 - //GO(__NR_sched_setaffinity, ".s .m"); - //SY(__NR_sched_setaffinity); - - // __NR_sched_getaffinity 242 - //GO(__NR_sched_getaffinity, ".s .m"); - //SY(__NR_sched_getaffinity); - - // __NR_set_thread_area 243 - //GO(__NR_set_thread_area, ".s .m"); - //SY(__NR_set_thread_area); - - // __NR_get_thread_area 244 - //GO(__NR_get_thread_area, ".s .m"); - //SY(__NR_get_thread_area); - - // __NR_io_setup 245 - //GO(__NR_io_setup, ".s .m"); - //SY(__NR_io_setup); - - // __NR_io_destroy 246 - //GO(__NR_io_destroy, ".s .m"); - //SY(__NR_io_destroy); - - // __NR_io_getevents 247 - //GO(__NR_io_getevents, ".s .m"); - //SY(__NR_io_getevents); - - // __NR_io_submit 248 - //GO(__NR_io_submit, ".s .m"); - //SY(__NR_io_submit); - - // __NR_io_cancel 249 - //GO(__NR_io_cancel, ".s .m"); - //SY(__NR_io_cancel); - - // __NR_fadvise64 250 - //GO(__NR_fadvise64, ".s .m"); - //SY(__NR_fadvise64); - - // 251 --> sys_ni_syscall() - GO(251, "0e"); - SY(251); - - // __NR_exit_group 252 - - // __NR_lookup_dcookie 253 --> sys_lookup_dcookie() - GO(__NR_lookup_dcookie, "4s 1m"); - SY(__NR_lookup_dcookie, x0, x0, x0, x0+1); - - // __NR_epoll_create 254 - //GO(__NR_epoll_create, ".s .m"); - //SY(__NR_epoll_create); - - // __NR_epoll_ctl 255 - //GO(__NR_epoll_ctl, ".s .m"); - //SY(__NR_epoll_ctl); - - // __NR_epoll_wait 256 - //GO(__NR_epoll_wait, ".s .m"); - //SY(__NR_epoll_wait); - - // __NR_remap_file_pages 257 - //GO(__NR_remap_file_pages, ".s .m"); - //SY(__NR_remap_file_pages); - - // __NR_set_tid_address 258 - //GO(__NR_set_tid_address, ".s .m"); - //SY(__NR_set_tid_address); - - // __NR_timer_create 259 - //GO(__NR_timer_create, ".s .m"); - //SY(__NR_timer_create); - - // __NR_timer_settime (__NR_timer_create+1) - //GO(__NR_timer_settime, ".s .m"); - //SY(__NR_timer_settime); - - // __NR_timer_gettime (__NR_timer_create+2) - //GO(__NR_timer_gettime, ".s .m"); - //SY(__NR_timer_gettime); - - // __NR_timer_getoverrun (__NR_timer_create+3) - //GO(__NR_timer_getoverrun, ".s .m"); - //SY(__NR_timer_getoverrun); - - // __NR_timer_delete (__NR_timer_create+4) - //GO(__NR_timer_delete, ".s .m"); - //SY(__NR_timer_delete); - - // __NR_clock_settime (__NR_timer_create+5) - //GO(__NR_clock_settime, ".s .m"); - //SY(__NR_clock_settime); - - // __NR_clock_gettime (__NR_timer_create+6) - //GO(__NR_clock_gettime, ".s .m"); - //SY(__NR_clock_gettime); - - // __NR_clock_getres (__NR_timer_create+7) - //GO(__NR_clock_getres, ".s .m"); - //SY(__NR_clock_getres); - - // __NR_clock_nanosleep (__NR_timer_create+8) - //GO(__NR_clock_nanosleep, ".s .m"); - //SY(__NR_clock_nanosleep); - - // __NR_statfs64 268 - //GO(__NR_statfs64, ".s .m"); - //SY(__NR_statfs64); - - // __NR_fstatfs64 269 - //GO(__NR_fstatfs64, ".s .m"); - //SY(__NR_fstatfs64); - - // __NR_tgkill 270 - //GO(__NR_tgkill, ".s .m"); - //SY(__NR_tgkill); - - // __NR_utimes 271 - //GO(__NR_utimes, ".s .m"); - //SY(__NR_utimes); - - // __NR_fadvise64_64 272 - //GO(__NR_fadvise64_64, ".s .m"); - //SY(__NR_fadvise64_64); - - // __NR_vserver 273 --> sys_ni_syscall() - //GO(__NR_vserver, "0e"); - //SY(__NR_vserver); - - // __NR_mbind 274 - //GO(__NR_mbind, ".s .m"); - //SY(__NR_mbind); - - // __NR_get_mempolicy 275 - //GO(__NR_get_mempolicy, ".s .m"); - //SY(__NR_get_mempolicy); - - // __NR_set_mempolicy 276 - //GO(__NR_set_mempolicy, ".s .m"); - //SY(__NR_set_mempolicy); - - // __NR_mq_open 277 - //GO(__NR_mq_open, ".s .m"); - //SY(__NR_mq_open); - - // __NR_mq_unlink (__NR_mq_open+1) - //GO(__NR_mq_unlink, ".s .m"); - //SY(__NR_mq_unlink); - - // __NR_mq_timedsend (__NR_mq_open+2) - //GO(__NR_mq_timedsend, ".s .m"); - //SY(__NR_mq_timedsend); - - // __NR_mq_timedreceive (__NR_mq_open+3) - //GO(__NR_mq_timedreceive, ".s .m"); - //SY(__NR_mq_timedreceive); - - // __NR_mq_notify (__NR_mq_open+4) - //GO(__NR_mq_notify, ".s .m"); - //SY(__NR_mq_notify); - - // __NR_mq_getsetattr (__NR_mq_open+5) - //GO(__NR_mq_getsetattr, ".s .m"); - //SY(__NR_mq_getsetattr); - - // __NR_sys_kexec_load 283 --> sys_ni_syscall() - //GO(__NR_sys_kexec_load, "0e"); - //SY(__NR_sys_kexec_load); - - GO(9999, "1e"); - SY(9999); - // __NR_exit 1 --> sys_exit() GO(__NR_exit, "1s 0m"); SY(__NR_exit, x0); diff --git a/memcheck/tests/scalar.stderr.exp b/memcheck/tests/scalar.stderr.exp index be2f260e68..784ec66321 100644 --- a/memcheck/tests/scalar.stderr.exp +++ b/memcheck/tests/scalar.stderr.exp @@ -594,1354 +594,6 @@ Syscall param setgid16(gid) contains uninitialised byte(s) ----------------------------------------------------- 49: __NR_geteuid 0e ----------------------------------------------------- ------------------------------------------------------ - 50: __NR_getegid 0e ------------------------------------------------------ ------------------------------------------------------ - 51: __NR_acct 1s 1m ------------------------------------------------------ - -Syscall param acct(filename) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param acct(filename) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 52: __NR_umount2 2s 1m ------------------------------------------------------ - -Syscall param umount2(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param umount2(flags) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param umount2(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 53: __NR_lock 0e ------------------------------------------------------ ------------------------------------------------------ - 54: __NR_ioctl 3s 1m ------------------------------------------------------ - -Syscall param ioctl(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param ioctl(request) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param ioctl(arg) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param ioctl(TCSET{S,SW,SF}) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 55: __NR_fcntl 3s 0m ------------------------------------------------------ - -Syscall param fcntl(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fcntl(cmd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fcntl(arg) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ - 56: __NR_mpx 0e ------------------------------------------------------ ------------------------------------------------------ - 57: __NR_setpgid 2s 0m ------------------------------------------------------ - -Syscall param setpgid(pid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setpgid(pgid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ - 58: __NR_ulimit 0e ------------------------------------------------------ ------------------------------------------------------ - 60: __NR_umask 1s 0m ------------------------------------------------------ - -Syscall param umask(mask) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ - 61: __NR_chroot 1s 1m ------------------------------------------------------ - -Syscall param chroot(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chroot(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 63: __NR_dup2 2s 0m ------------------------------------------------------ - -Syscall param dup2(oldfd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param dup2(newfd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ - 64: __NR_getppid 0e ------------------------------------------------------ ------------------------------------------------------ - 65: __NR_getpgrp 0e ------------------------------------------------------ ------------------------------------------------------ - 66: __NR_setsid 0e ------------------------------------------------------ ------------------------------------------------------ - 67: __NR_sigaction 3s 2m ------------------------------------------------------ - -Syscall param sigaction(signum) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param sigaction(act) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param sigaction(oldact) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param sigaction(act) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param sigaction(oldact) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 70: __NR_setreuid 2s 0m ------------------------------------------------------ - -Syscall param setreuid16(ruid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setreuid16(euid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ - 71: __NR_setregid 2s 0m ------------------------------------------------------ - -Syscall param setregid16(rgid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setregid16(egid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ - 73: __NR_sigpending 1s 1m ------------------------------------------------------ - -Syscall param sigpending(set) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param sigpending(set) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 75: __NR_setrlimit 2s 1m ------------------------------------------------------ - -Syscall param setrlimit(resource) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setrlimit(rlim) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setrlimit(rlim) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 76: __NR_getrlimit 2s 1m ------------------------------------------------------ - -Syscall param old_getrlimit(resource) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param old_getrlimit(rlim) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param old_getrlimit(rlim) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 77: __NR_getrusage 2s 1m ------------------------------------------------------ - -Syscall param getrusage(who) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getrusage(usage) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getrusage(usage) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 78: __NR_gettimeofday 2s 2m ------------------------------------------------------ - -Syscall param gettimeofday(tv) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param gettimeofday(tz) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param gettimeofday(tv) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param gettimeofday(tz) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 79: __NR_settimeofday 2s 2m ------------------------------------------------------ - -Syscall param settimeofday(tv) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param settimeofday(tz) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param settimeofday(tv) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param settimeofday(tz) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 80: __NR_getgroups 2s 1m ------------------------------------------------------ - -Syscall param getgroups16(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getgroups16(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getgroups16(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 81: __NR_setgroups 2s 1m ------------------------------------------------------ - -Syscall param setgroups16(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setgroups16(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setgroups16(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 82: __NR_select 1s 4m ------------------------------------------------------ - -Syscall param old_select(args) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param old_select(readfds) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param old_select(writefds) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param old_select(exceptfds) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param old_select(timeout) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ - 95: __NR_fchown 3s 0m ------------------------------------------------------ - -Syscall param fchown16(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fchown16(owner) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fchown16(group) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -106: __NR_stat 2s 2m ------------------------------------------------------ - -Syscall param stat(file_name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param stat(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param stat(file_name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param stat(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -107: __NR_lstat 2s 2m ------------------------------------------------------ - -Syscall param lstat(file_name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lstat(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lstat(file_name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lstat(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -108: __NR_fstat 2s 1m ------------------------------------------------------ - -Syscall param fstat(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fstat(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fstat(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -111: __NR_vhangup 0e ------------------------------------------------------ ------------------------------------------------------ -112: __NR_idle 0e ------------------------------------------------------ ------------------------------------------------------ -122: __NR_uname 1s 1m ------------------------------------------------------ - -Syscall param uname(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param uname(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -127: __NR_create_module 0e ------------------------------------------------------ ------------------------------------------------------ -130:__NR_get_kernel_syms 0e ------------------------------------------------------ ------------------------------------------------------ -137: __NR_afs_syscall 0e ------------------------------------------------------ ------------------------------------------------------ -138: __NR_setfsuid 1s 0m ------------------------------------------------------ - -Syscall param setfsuid16(uid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -139: __NR_setfsgid 1s 0m ------------------------------------------------------ - -Syscall param setfsgid16(gid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -142: __NR__newselect 5s 4m ------------------------------------------------------ - -Syscall param select(n) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param select(readfds) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param select(writefds) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param select(exceptfds) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param select(timeout) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param select(readfds) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param select(writefds) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param select(exceptfds) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param select(timeout) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -153: __NR_munlockall 0e ------------------------------------------------------ ------------------------------------------------------ -167: __NR_query_module 0e ------------------------------------------------------ ------------------------------------------------------ -174: __NR_rt_sigaction 4s 2m ------------------------------------------------------ - -Syscall param rt_sigaction(signum) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param rt_sigaction(act) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param rt_sigaction(oldact) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param rt_sigaction(sigsetsize) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param rt_sigaction(act) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param rt_sigaction(oldact) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -182: __NR_chown 3s 1m ------------------------------------------------------ - -Syscall param chown16(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chown16(owner) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chown16(group) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chown16(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -191: __NR_ugetrlimit 2s 1m ------------------------------------------------------ - -Syscall param getrlimit(resource) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getrlimit(rlim) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getrlimit(rlim) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -195: __NR_stat64 2s 2m ------------------------------------------------------ - -Syscall param stat64(file_name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param stat64(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param stat64(file_name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param stat64(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -196: __NR_lstat64 2s 2m ------------------------------------------------------ - -Syscall param lstat64(file_name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lstat64(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lstat64(file_name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lstat64(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -197: __NR_fstat64 2s 1m ------------------------------------------------------ - -Syscall param fstat64(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fstat64(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fstat64(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -198: __NR_lchown32 3s 1m ------------------------------------------------------ - -Syscall param lchown(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lchown(owner) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lchown(group) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lchown(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -199: __NR_getuid32 0e ------------------------------------------------------ ------------------------------------------------------ -200: __NR_getgid32 0e ------------------------------------------------------ ------------------------------------------------------ -201: __NR_geteuid32 0e ------------------------------------------------------ ------------------------------------------------------ -202: __NR_getegid32 0e ------------------------------------------------------ ------------------------------------------------------ -203: __NR_setreuid32 2s 0m ------------------------------------------------------ - -Syscall param setreuid(ruid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setreuid(euid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -204: __NR_setregid32 2s 0m ------------------------------------------------------ - -Syscall param setregid(rgid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setregid(egid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -205: __NR_getgroups32 2s 1m ------------------------------------------------------ - -Syscall param getgroups(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getgroups(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getgroups(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -206: __NR_setgroups32 2s 1m ------------------------------------------------------ - -Syscall param setgroups(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setgroups(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setgroups(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -207: __NR_fchown32 3s 0m ------------------------------------------------------ - -Syscall param fchown(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fchown(owner) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fchown(group) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -212: __NR_chown32 3s 1m ------------------------------------------------------ - -Syscall param chown(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chown(owner) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chown(group) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param chown(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -213: __NR_setuid32 1s 0m ------------------------------------------------------ - -Syscall param setuid(uid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -214: __NR_setgid32 1s 0m ------------------------------------------------------ - -Syscall param setgid(gid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -215: __NR_setfsuid32 1s 0m ------------------------------------------------------ - -Syscall param setfsuid(uid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -216: __NR_setfsgid32 1s 0m ------------------------------------------------------ - -Syscall param setfsgid(gid) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... ------------------------------------------------------ -222: 222 0e ------------------------------------------------------ ------------------------------------------------------ -223: 223 0e ------------------------------------------------------ ------------------------------------------------------ -226: __NR_setxattr 5s 3m ------------------------------------------------------ - -Syscall param setxattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setxattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setxattr(value) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setxattr(flags) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param setxattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param setxattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param setxattr(value) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -227: __NR_lsetxattr 5s 3m ------------------------------------------------------ - -Syscall param lsetxattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lsetxattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lsetxattr(value) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lsetxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lsetxattr(flags) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lsetxattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lsetxattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lsetxattr(value) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -228: __NR_fsetxattr 5s 2m ------------------------------------------------------ - -Syscall param fsetxattr(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fsetxattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fsetxattr(value) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fsetxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fsetxattr(flags) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fsetxattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fsetxattr(value) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -229: __NR_getxattr 4s 3m ------------------------------------------------------ - -Syscall param getxattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getxattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getxattr(value) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param getxattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param getxattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param getxattr(value) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -230: __NR_lgetxattr 4s 3m ------------------------------------------------------ - -Syscall param lgetxattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lgetxattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lgetxattr(value) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lgetxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lgetxattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lgetxattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lgetxattr(value) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -231: __NR_fgetxattr 4s 2m ------------------------------------------------------ - -Syscall param fgetxattr(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fgetxattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fgetxattr(value) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fgetxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fgetxattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fgetxattr(value) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -232: __NR_listxattr 3s 2m ------------------------------------------------------ - -Syscall param listxattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param listxattr(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param listxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param listxattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param listxattr(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -233: __NR_llistxattr 3s 2m ------------------------------------------------------ - -Syscall param llistxattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param llistxattr(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param llistxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param llistxattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param llistxattr(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -234: __NR_flistxattr 3s 1m ------------------------------------------------------ - -Syscall param flistxattr(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param flistxattr(list) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param flistxattr(size) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param flistxattr(list) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -235: __NR_removexattr 2s 2m ------------------------------------------------------ - -Syscall param removexattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param removexattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param removexattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param removexattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -236: __NR_lremovexattr 2s 2m ------------------------------------------------------ - -Syscall param lremovexattr(path) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lremovexattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lremovexattr(path) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param lremovexattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -237: __NR_fremovexattr 2s 1m ------------------------------------------------------ - -Syscall param fremovexattr(fd) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fremovexattr(name) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param fremovexattr(name) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -251: 251 0e ------------------------------------------------------ ------------------------------------------------------ -253: __NR_lookup_dcookie 4s 1m ------------------------------------------------------ - -Syscall param lookup_dcookie(cookie_low32) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lookup_dcookie(cookie_high32) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lookup_dcookie(buf) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lookup_dcookie(len) contains uninitialised byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - -Syscall param lookup_dcookie(buf) points to unaddressable byte(s) - at 0x........: syscall (in /...libc...) - by 0x........: __libc_start_main (...libc...) - by 0x........: ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd ------------------------------------------------------ -9999: 9999 1e ------------------------------------------------------ -WARNING: unhandled syscall: 9999 -Do not panic. You may be able to fix this easily. -Read the file README_MISSING_SYSCALL_OR_IOCTL. ----------------------------------------------------- 1: __NR_exit 1s 0m ----------------------------------------------------- diff --git a/memcheck/tests/scalar2.c b/memcheck/tests/scalar2.c new file mode 100644 index 0000000000..9f000b3199 --- /dev/null +++ b/memcheck/tests/scalar2.c @@ -0,0 +1,211 @@ + +#include "scalar.h" + +int main(void) +{ + // uninitialised, but we know px[0] is 0x0 + long* px = malloc(sizeof(long)); + long x0 = px[0]; + + // All __NR_xxx numbers are taken from x86 + + // 50--99 + + // __NR_getegid 50 --> sys_getegid16() + GO(__NR_getegid, "0e"); + SY(__NR_getegid); + + // __NR_acct 51 --> sys_acct() + GO(__NR_acct, "1s 1m"); + SY(__NR_acct, x0); + + // __NR_umount2 52 --> sys_umount() + GO(__NR_umount2, "2s 1m"); + SY(__NR_umount2, x0, x0); + + // __NR_lock 53 --> sys_ni_syscall() + GO(__NR_lock, "0e"); + SY(__NR_lock); + + // __NR_ioctl 54 --> sys_ioctl() + #include + GO(__NR_ioctl, "3s 1m"); + SY(__NR_ioctl, x0, x0+TCSETS, x0); + + // __NR_fcntl 55 --> sys_fcntl() + GO(__NR_fcntl, "3s 0m"); + SY(__NR_fcntl, x0, x0, x0); + + // __NR_mpx 56 --> sys_ni_syscall() + GO(__NR_mpx, "0e"); + SY(__NR_mpx); + + // __NR_setpgid 57 + GO(__NR_setpgid, "2s 0m"); + SY(__NR_setpgid, x0, x0); + + // __NR_ulimit 58 --> sys_ni_syscall() + GO(__NR_ulimit, "0e"); + SY(__NR_ulimit); + + // __NR_oldolduname 59 + // (obsolete, not handled by Valgrind) + + // __NR_umask 60 + GO(__NR_umask, "1s 0m"); + SY(__NR_umask, x0); + + // __NR_chroot 61 + GO(__NR_chroot, "1s 1m"); + SY(__NR_chroot, x0); + + // __NR_ustat 62 + // (deprecated, not handled by Valgrind) + + // __NR_dup2 63 + GO(__NR_dup2, "2s 0m"); + SY(__NR_dup2, x0, x0); + + // __NR_getppid 64 --> sys_getppid() + GO(__NR_getppid, "0e"); + SY(__NR_getppid); + + // __NR_getpgrp 65 --> sys_getpgrp() + GO(__NR_getpgrp, "0e"); + SY(__NR_getpgrp); + + // __NR_setsid 66 --> sys_setsid() + GO(__NR_setsid, "0e"); + SY(__NR_setsid); + + // __NR_sigaction 67 --> sys_sigaction() + GO(__NR_sigaction, "3s 2m"); + SY(__NR_sigaction, x0, x0+1, x0+1); + + // __NR_sgetmask 68 + // (Not yet handled by Valgrind) + + // __NR_ssetmask 69 + // (Not yet handled by Valgrind) + + // __NR_setreuid 70 --> sys_setreuid16() + GO(__NR_setreuid, "2s 0m"); + SY(__NR_setreuid, x0, x0); + + // __NR_setregid 71 --> sys_setregid16() + GO(__NR_setregid, "2s 0m"); + SY(__NR_setregid, x0, x0); + + // __NR_sigsuspend 72 --> sys_sigsuspend() + // XXX: how do you use this function? +// GO(__NR_sigsuspend, ".s .m"); +// SY(__NR_sigsuspend); + + // __NR_sigpending 73 --> sys_sigpending() + GO(__NR_sigpending, "1s 1m"); + SY(__NR_sigpending, x0); + + // __NR_sethostname 74 + // (Not yet handled by Valgrind) + + // __NR_setrlimit 75 --> sys_setrlimit() + GO(__NR_setrlimit, "2s 1m"); + SY(__NR_setrlimit, x0, x0); + + // __NR_getrlimit 76 + GO(__NR_getrlimit, "2s 1m"); + SY(__NR_getrlimit, x0, x0); + + // __NR_getrusage 77 + GO(__NR_getrusage, "2s 1m"); + SY(__NR_getrusage, x0, x0); + + // __NR_gettimeofday 78 --> sys_gettimeofday() + GO(__NR_gettimeofday, "2s 2m"); + SY(__NR_gettimeofday, x0, x0+1); + + // __NR_settimeofday 79 --> sys_settimeofday() + GO(__NR_settimeofday, "2s 2m"); + SY(__NR_settimeofday, x0, x0+1); + + // __NR_getgroups 80 --> sys_getgroups16() + GO(__NR_getgroups, "2s 1m"); + SY(__NR_getgroups, x0+1, x0+1); + + // __NR_setgroups 81 --> sys_setgroups16() + GO(__NR_setgroups, "2s 1m"); + SY(__NR_setgroups, x0+1, x0+1); + + // __NR_select 82 --> old_select() + { + long args[5] = { x0+8, x0+0xffffffee, x0+1, x0+1, x0+1 }; + GO(__NR_select, "1s 4m"); + SY(__NR_select, args+x0); + } + + // __NR_symlink 83 + //GO(__NR_symlink, ".s .m"); + //SY(__NR_symlink); + + // __NR_oldlstat 84 + // (obsolete, not handled by Valgrind) + + // __NR_readlink 85 + //GO(__NR_readlink, ".s .m"); + //SY(__NR_readlink); + + // __NR_uselib 86 + // (Not yet handled by Valgrind) + + // __NR_swapon 87 + // (Not yet handled by Valgrind) + + // __NR_reboot 88 + // (Not yet handled by Valgrind) + + // __NR_readdir 89 + // (superseded, not handled by Valgrind) + + // __NR_mmap 90 + //GO(__NR_mmap, ".s .m"); + //SY(__NR_mmap); + + // __NR_munmap 91 + //GO(__NR_munmap, ".s .m"); + //SY(__NR_munmap); + + // __NR_truncate 92 + //GO(__NR_truncate, ".s .m"); + //SY(__NR_truncate); + + // __NR_ftruncate 93 + //GO(__NR_ftruncate, ".s .m"); + //SY(__NR_ftruncate); + + // __NR_fchmod 94 + //GO(__NR_fchmod, ".s .m"); + //SY(__NR_fchmod); + + // __NR_fchown 95 --> sys_fchown16 + GO(__NR_fchown, "3s 0m"); + SY(__NR_fchown, x0, x0, x0); + + // __NR_getpriority 96 + //GO(__NR_getpriority, ".s .m"); + //SY(__NR_getpriority); + + // __NR_setpriority 97 + //GO(__NR_setpriority, ".s .m"); + //SY(__NR_setpriority); + + // __NR_profil 98 + //GO(__NR_profil, ".s .m"); + //SY(__NR_profil); + + // __NR_statfs 99 + //GO(__NR_statfs, ".s .m"); + //SY(__NR_statfs); + + return 0; +} + diff --git a/memcheck/tests/scalar2.stderr.exp b/memcheck/tests/scalar2.stderr.exp new file mode 100644 index 0000000000..981a3422b5 --- /dev/null +++ b/memcheck/tests/scalar2.stderr.exp @@ -0,0 +1,411 @@ +----------------------------------------------------- + 50: __NR_getegid 0e +----------------------------------------------------- +----------------------------------------------------- + 51: __NR_acct 1s 1m +----------------------------------------------------- +Syscall param acct(filename) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param acct(filename) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 52: __NR_umount2 2s 1m +----------------------------------------------------- + +Syscall param umount2(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param umount2(flags) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param umount2(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 53: __NR_lock 0e +----------------------------------------------------- +----------------------------------------------------- + 54: __NR_ioctl 3s 1m +----------------------------------------------------- + +Syscall param ioctl(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param ioctl(request) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param ioctl(arg) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param ioctl(TCSET{S,SW,SF}) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 55: __NR_fcntl 3s 0m +----------------------------------------------------- + +Syscall param fcntl(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fcntl(cmd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fcntl(arg) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- + 56: __NR_mpx 0e +----------------------------------------------------- +----------------------------------------------------- + 57: __NR_setpgid 2s 0m +----------------------------------------------------- + +Syscall param setpgid(pid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setpgid(pgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- + 58: __NR_ulimit 0e +----------------------------------------------------- +----------------------------------------------------- + 60: __NR_umask 1s 0m +----------------------------------------------------- + +Syscall param umask(mask) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- + 61: __NR_chroot 1s 1m +----------------------------------------------------- + +Syscall param chroot(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chroot(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 63: __NR_dup2 2s 0m +----------------------------------------------------- + +Syscall param dup2(oldfd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param dup2(newfd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- + 64: __NR_getppid 0e +----------------------------------------------------- +----------------------------------------------------- + 65: __NR_getpgrp 0e +----------------------------------------------------- +----------------------------------------------------- + 66: __NR_setsid 0e +----------------------------------------------------- +----------------------------------------------------- + 67: __NR_sigaction 3s 2m +----------------------------------------------------- + +Syscall param sigaction(signum) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param sigaction(act) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param sigaction(oldact) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param sigaction(act) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param sigaction(oldact) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 70: __NR_setreuid 2s 0m +----------------------------------------------------- + +Syscall param setreuid16(ruid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setreuid16(euid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- + 71: __NR_setregid 2s 0m +----------------------------------------------------- + +Syscall param setregid16(rgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setregid16(egid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- + 73: __NR_sigpending 1s 1m +----------------------------------------------------- + +Syscall param sigpending(set) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param sigpending(set) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 75: __NR_setrlimit 2s 1m +----------------------------------------------------- + +Syscall param setrlimit(resource) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setrlimit(rlim) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setrlimit(rlim) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 76: __NR_getrlimit 2s 1m +----------------------------------------------------- + +Syscall param old_getrlimit(resource) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param old_getrlimit(rlim) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param old_getrlimit(rlim) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 77: __NR_getrusage 2s 1m +----------------------------------------------------- + +Syscall param getrusage(who) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getrusage(usage) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getrusage(usage) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 78: __NR_gettimeofday 2s 2m +----------------------------------------------------- + +Syscall param gettimeofday(tv) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param gettimeofday(tz) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param gettimeofday(tv) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param gettimeofday(tz) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 79: __NR_settimeofday 2s 2m +----------------------------------------------------- + +Syscall param settimeofday(tv) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param settimeofday(tz) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param settimeofday(tv) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param settimeofday(tz) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 80: __NR_getgroups 2s 1m +----------------------------------------------------- + +Syscall param getgroups16(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getgroups16(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getgroups16(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 81: __NR_setgroups 2s 1m +----------------------------------------------------- + +More than 50 errors detected. Subsequent errors +will still be recorded, but in less detail than before. + +Syscall param setgroups16(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setgroups16(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setgroups16(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 82: __NR_select 1s 4m +----------------------------------------------------- + +Syscall param old_select(args) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param old_select(readfds) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param old_select(writefds) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param old_select(exceptfds) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param old_select(timeout) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- + 95: __NR_fchown 3s 0m +----------------------------------------------------- + +Syscall param fchown16(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fchown16(owner) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fchown16(group) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... diff --git a/memcheck/tests/scalar2.vgtest b/memcheck/tests/scalar2.vgtest new file mode 100644 index 0000000000..365b1499ed --- /dev/null +++ b/memcheck/tests/scalar2.vgtest @@ -0,0 +1,2 @@ +prog: scalar2 +vgopts: -q diff --git a/memcheck/tests/scalar3.c b/memcheck/tests/scalar3.c new file mode 100644 index 0000000000..23de759e59 --- /dev/null +++ b/memcheck/tests/scalar3.c @@ -0,0 +1,215 @@ + +#include "scalar.h" + +int main(void) +{ + // uninitialised, but we know px[0] is 0x0 + long* px = malloc(sizeof(long)); + long x0 = px[0]; + + // All __NR_xxx numbers are taken from x86 + + // 100--149 + + // __NR_fstatfs 100 + //GO(__NR_fstatfs, ".s .m"); + //SY(__NR_fstatfs); + + // __NR_ioperm 101 + //GO(__NR_ioperm, ".s .m"); + //SY(__NR_ioperm); + + // __NR_socketcall 102 + //GO(__NR_socketcall, ".s .m"); + //SY(__NR_socketcall); + + // __NR_syslog 103 + //GO(__NR_syslog, ".s .m"); + //SY(__NR_syslog); + + // __NR_setitimer 104 + //GO(__NR_setitimer, ".s .m"); + //SY(__NR_setitimer); + + // __NR_getitimer 105 + //GO(__NR_getitimer, ".s .m"); + //SY(__NR_getitimer); + + // __NR_stat 106 --> sys_newstat() + GO(__NR_stat, "2s 2m"); + SY(__NR_stat, x0, x0); + + // __NR_lstat 107 --> sys_newlstat() + GO(__NR_lstat, "2s 2m"); + SY(__NR_lstat, x0, x0); + + // __NR_fstat 108 --> sys_newfstat() + GO(__NR_fstat, "2s 1m"); + SY(__NR_fstat, x0, x0); + + // __NR_olduname 109 + // (obsolete, not handled by Valgrind) + + // __NR_iopl 110 + //GO(__NR_iopl, ".s .m"); + //SY(__NR_iopl); + + // __NR_vhangup 111 --> sys_vhangup() + GO(__NR_vhangup, "0e"); + SY(__NR_vhangup); + + // __NR_idle 112 --> sys_ni_syscall() + GO(__NR_idle, "0e"); + SY(__NR_idle); + + // __NR_vm86old 113 + //GO(__NR_vm86old, ".s .m"); + //SY(__NR_vm86old); + + // __NR_wait4 114 + //GO(__NR_wait4, ".s .m"); + //SY(__NR_wait4); + + // __NR_swapoff 115 + //GO(__NR_swapoff, ".s .m"); + //SY(__NR_swapoff); + + // __NR_sysinfo 116 + //GO(__NR_sysinfo, ".s .m"); + //SY(__NR_sysinfo); + + // __NR_ipc 117 + //GO(__NR_ipc, ".s .m"); + //SY(__NR_ipc); + + // __NR_fsync 118 + //GO(__NR_fsync, ".s .m"); + //SY(__NR_fsync); + + // __NR_sigreturn 119 + //GO(__NR_sigreturn, ".s .m"); + //SY(__NR_sigreturn); + + // __NR_clone 120 + //GO(__NR_clone, ".s .m"); + //SY(__NR_clone); + + // __NR_setdomainname 121 + //GO(__NR_setdomainname, ".s .m"); + //SY(__NR_setdomainname); + + // __NR_uname 122 + GO(__NR_uname, "1s 1m"); + SY(__NR_uname, x0); + + // __NR_modify_ldt 123 + //GO(__NR_modify_ldt, ".s .m"); + //SY(__NR_modify_ldt); + + // __NR_adjtimex 124 + //GO(__NR_adjtimex, ".s .m"); + //SY(__NR_adjtimex); + + // __NR_mprotect 125 + //GO(__NR_mprotect, ".s .m"); + //SY(__NR_mprotect); + + // __NR_sigprocmask 126 + //GO(__NR_sigprocmask, ".s .m"); + //SY(__NR_sigprocmask); + + // __NR_create_module 127 --> sys_ni_syscall() + GO(__NR_create_module, "0e"); + SY(__NR_create_module); + + // __NR_init_module 128 + //GO(__NR_init_module, ".s .m"); + //SY(__NR_init_module); + + // __NR_delete_module 129 + //GO(__NR_delete_module, ".s .m"); + //SY(__NR_delete_module); + + // __NR_get_kernel_syms 130 --> sys_ni_syscall() + GO(__NR_get_kernel_syms, "0e"); + SY(__NR_get_kernel_syms); + + // __NR_quotactl 131 + //GO(__NR_quotactl, ".s .m"); + //SY(__NR_quotactl); + + // __NR_getpgid 132 + //GO(__NR_getpgid, ".s .m"); + //SY(__NR_getpgid); + + // __NR_fchdir 133 + //GO(__NR_fchdir, ".s .m"); + //SY(__NR_fchdir); + + // __NR_bdflush 134 + //GO(__NR_bdflush, ".s .m"); + //SY(__NR_bdflush); + + // __NR_sysfs 135 + //GO(__NR_sysfs, ".s .m"); + //SY(__NR_sysfs); + + // __NR_personality 136 + //GO(__NR_personality, ".s .m"); + //SY(__NR_personality); + + // __NR_afs_syscall 137 --> sys_ni_syscall() + GO(__NR_afs_syscall, "0e"); + SY(__NR_afs_syscall); + + // __NR_setfsuid 138 + GO(__NR_setfsuid, "1s 0m"); + SY(__NR_setfsuid, x0); + + // __NR_setfsgid 139 + GO(__NR_setfsgid, "1s 0m"); + SY(__NR_setfsgid, x0); + + // __NR__llseek 140 + //GO(__NR__llseek, ".s .m"); + //SY(__NR__llseek); + + // __NR_getdents 141 + //GO(__NR_getdents, ".s .m"); + //SY(__NR_getdents); + + // __NR__newselect 142 --> sys_select() + GO(__NR__newselect, "5s 4m"); + SY(__NR__newselect, x0+8, x0+0xffffffff, x0+1, x0+1, x0+1); + + // __NR_flock 143 + //GO(__NR_flock, ".s .m"); + //SY(__NR_flock); + + // __NR_msync 144 + //GO(__NR_msync, ".s .m"); + //SY(__NR_msync); + + // __NR_readv 145 + //GO(__NR_readv, ".s .m"); + //SY(__NR_readv); + + // __NR_writev 146 + //GO(__NR_writev, ".s .m"); + //SY(__NR_writev); + + // __NR_getsid 147 + //GO(__NR_getsid, ".s .m"); + //SY(__NR_getsid); + + // __NR_fdatasync 148 + //GO(__NR_fdatasync, ".s .m"); + //SY(__NR_fdatasync); + + // __NR__sysctl 149 + //GO(__NR__sysctl, ".s .m"); + //SY(__NR__sysctl); + + return 0; +} + diff --git a/memcheck/tests/scalar3.stderr.exp b/memcheck/tests/scalar3.stderr.exp new file mode 100644 index 0000000000..793caf0603 --- /dev/null +++ b/memcheck/tests/scalar3.stderr.exp @@ -0,0 +1,165 @@ +----------------------------------------------------- +106: __NR_stat 2s 2m +----------------------------------------------------- +Syscall param stat(file_name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param stat(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param stat(file_name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param stat(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +107: __NR_lstat 2s 2m +----------------------------------------------------- + +Syscall param lstat(file_name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lstat(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lstat(file_name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lstat(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +108: __NR_fstat 2s 1m +----------------------------------------------------- + +Syscall param fstat(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fstat(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fstat(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +111: __NR_vhangup 0e +----------------------------------------------------- +----------------------------------------------------- +112: __NR_idle 0e +----------------------------------------------------- +----------------------------------------------------- +122: __NR_uname 1s 1m +----------------------------------------------------- + +Syscall param uname(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param uname(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +127: __NR_create_module 0e +----------------------------------------------------- +----------------------------------------------------- +130:__NR_get_kernel_syms 0e +----------------------------------------------------- +----------------------------------------------------- +137: __NR_afs_syscall 0e +----------------------------------------------------- +----------------------------------------------------- +138: __NR_setfsuid 1s 0m +----------------------------------------------------- + +Syscall param setfsuid16(uid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +139: __NR_setfsgid 1s 0m +----------------------------------------------------- + +Syscall param setfsgid16(gid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +142: __NR__newselect 5s 4m +----------------------------------------------------- + +Syscall param select(n) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param select(readfds) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param select(writefds) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param select(exceptfds) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param select(timeout) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param select(readfds) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param select(writefds) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param select(exceptfds) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param select(timeout) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd diff --git a/memcheck/tests/scalar3.vgtest b/memcheck/tests/scalar3.vgtest new file mode 100644 index 0000000000..666e7db1bd --- /dev/null +++ b/memcheck/tests/scalar3.vgtest @@ -0,0 +1,2 @@ +prog: scalar3 +vgopts: -q diff --git a/memcheck/tests/scalar4.c b/memcheck/tests/scalar4.c new file mode 100644 index 0000000000..95a3f7b2c0 --- /dev/null +++ b/memcheck/tests/scalar4.c @@ -0,0 +1,216 @@ + +#include "scalar.h" + +int main(void) +{ + // uninitialised, but we know px[0] is 0x0 + long* px = malloc(sizeof(long)); + long x0 = px[0]; + + // All __NR_xxx numbers are taken from x86 + + // 150--199 + + // __NR_mlock 150 + //GO(__NR_mlock, ".s .m"); + //SY(__NR_mlock); + + // __NR_munlock 151 + //GO(__NR_munlock, ".s .m"); + //SY(__NR_munlock); + + // __NR_mlockall 152 + //GO(__NR_mlockall, ".s .m"); + //SY(__NR_mlockall); + + // __NR_munlockall 153 --> sys_munlockall() + GO(__NR_munlockall, "0e"); + SY(__NR_munlockall); + + // __NR_sched_setparam 154 + //GO(__NR_sched_setparam, ".s .m"); + //SY(__NR_sched_setparam); + + // __NR_sched_getparam 155 + //GO(__NR_sched_getparam, ".s .m"); + //SY(__NR_sched_getparam); + + // __NR_sched_setscheduler 156 + //GO(__NR_sched_setscheduler, ".s .m"); + //SY(__NR_sched_setscheduler); + + // __NR_sched_getscheduler 157 + //GO(__NR_sched_getscheduler, ".s .m"); + //SY(__NR_sched_getscheduler); + + // __NR_sched_yield 158 + //GO(__NR_sched_yield, ".s .m"); + //SY(__NR_sched_yield); + + // __NR_sched_get_priority_max 159 + //GO(__NR_sched_get_priority_max, ".s .m"); + //SY(__NR_sched_get_priority_max); + + // __NR_sched_get_priority_min 160 + //GO(__NR_sched_get_priority_min, ".s .m"); + //SY(__NR_sched_get_priority_min); + + // __NR_sched_rr_get_interval 161 + //GO(__NR_sched_rr_get_interval, ".s .m"); + //SY(__NR_sched_rr_get_interval); + + // __NR_nanosleep 162 + //GO(__NR_nanosleep, ".s .m"); + //SY(__NR_nanosleep); + + // __NR_mremap 163 + //GO(__NR_mremap, ".s .m"); + //SY(__NR_mremap); + + // __NR_setresuid 164 --> sys_setresuid16() + GO(__NR_setresuid, "3s 0m"); + SY(__NR_setresuid, x0, x0, x0); + + // __NR_getresuid 165 --> sys_getresuid16() + GO(__NR_getresuid, "3s 3m"); + SY(__NR_getresuid, x0, x0, x0); + + // __NR_vm86 166 + //GO(__NR_vm86, ".s .m"); + //SY(__NR_vm86); + + // __NR_query_module 167 --> sys_ni_syscall() + GO(__NR_query_module, "0e"); + SY(__NR_query_module); + + // __NR_poll 168 + //GO(__NR_poll, ".s .m"); + //SY(__NR_poll); + + // __NR_nfsservctl 169 + //GO(__NR_nfsservctl, ".s .m"); + //SY(__NR_nfsservctl); + + // __NR_setresgid 170 --> sys_setresgid16() + GO(__NR_setresgid, "3s 0m"); + SY(__NR_setresgid, x0, x0, x0); + + // __NR_getresgid 171 --> sys_getresgid16() + GO(__NR_getresgid, "3s 3m"); + SY(__NR_getresgid, x0, x0, x0); + + // __NR_prctl 172 + //GO(__NR_prctl, ".s .m"); + //SY(__NR_prctl); + + // __NR_rt_sigreturn 173 + //GO(__NR_rt_sigreturn, ".s .m"); + //SY(__NR_rt_sigreturn); + + // __NR_rt_sigaction 174 --> sys_rt_sigaction() + GO(__NR_rt_sigaction, "4s 2m"); + SY(__NR_rt_sigaction, x0, x0+1, x0+1, x0); + + // __NR_rt_sigprocmask 175 + //GO(__NR_rt_sigprocmask, ".s .m"); + //SY(__NR_rt_sigprocmask); + + // __NR_rt_sigpending 176 + //GO(__NR_rt_sigpending, ".s .m"); + //SY(__NR_rt_sigpending); + + // __NR_rt_sigtimedwait 177 + //GO(__NR_rt_sigtimedwait, ".s .m"); + //SY(__NR_rt_sigtimedwait); + + // __NR_rt_sigqueueinfo 178 + //GO(__NR_rt_sigqueueinfo, ".s .m"); + //SY(__NR_rt_sigqueueinfo); + + // __NR_rt_sigsuspend 179 + //GO(__NR_rt_sigsuspend, ".s .m"); + //SY(__NR_rt_sigsuspend); + + // __NR_pread64 180 + //GO(__NR_pread64, ".s .m"); + //SY(__NR_pread64); + + // __NR_pwrite64 181 + //GO(__NR_pwrite64, ".s .m"); + //SY(__NR_pwrite64); + + // __NR_chown 182 --> sys_chown16() + GO(__NR_chown, "3s 1m"); + SY(__NR_chown, x0, x0, x0); + + // __NR_getcwd 183 + //GO(__NR_getcwd, ".s .m"); + //SY(__NR_getcwd); + + // __NR_capget 184 + //GO(__NR_capget, ".s .m"); + //SY(__NR_capget); + + // __NR_capset 185 + //GO(__NR_capset, ".s .m"); + //SY(__NR_capset); + + // __NR_sigaltstack 186 + //GO(__NR_sigaltstack, ".s .m"); + //SY(__NR_sigaltstack); + + // __NR_sendfile 187 + //GO(__NR_sendfile, ".s .m"); + //SY(__NR_sendfile); + + // __NR_getpmsg 188 + //GO(__NR_getpmsg, ".s .m"); + //SY(__NR_getpmsg); + + // __NR_putpmsg 189 + //GO(__NR_putpmsg, ".s .m"); + //SY(__NR_putpmsg); + + // __NR_vfork 190 + //GO(__NR_vfork, ".s .m"); + //SY(__NR_vfork); + + // __NR_ugetrlimit 191 + GO(__NR_ugetrlimit, "2s 1m"); + SY(__NR_ugetrlimit, x0, x0); + + // __NR_mmap2 192 + //GO(__NR_mmap2, ".s .m"); + //SY(__NR_mmap2); + + // __NR_truncate64 193 + //GO(__NR_truncate64, ".s .m"); + //SY(__NR_truncate64); + + // __NR_ftruncate64 194 + //GO(__NR_ftruncate64, ".s .m"); + //SY(__NR_ftruncate64); + + // __NR_stat64 195 + GO(__NR_stat64, "2s 2m"); + SY(__NR_stat64, x0, x0); + + // __NR_lstat64 196 + GO(__NR_lstat64, "2s 2m"); + SY(__NR_lstat64, x0, x0); + + // __NR_fstat64 197 + GO(__NR_fstat64, "2s 1m"); + SY(__NR_fstat64, x0, x0); + + // __NR_lchown32 198 --> sys_chown() + GO(__NR_lchown32, "3s 1m"); + SY(__NR_lchown32, x0, x0, x0); + + // __NR_getuid32 199 --> sys_getuid() + GO(__NR_getuid32, "0e"); + SY(__NR_getuid32); + + return 0; +} + diff --git a/memcheck/tests/scalar4.stderr.exp b/memcheck/tests/scalar4.stderr.exp new file mode 100644 index 0000000000..340d3f8894 --- /dev/null +++ b/memcheck/tests/scalar4.stderr.exp @@ -0,0 +1,287 @@ +----------------------------------------------------- +153: __NR_munlockall 0e +----------------------------------------------------- +----------------------------------------------------- +164: __NR_setresuid 3s 0m +----------------------------------------------------- +Syscall param setresuid16(ruid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresuid16(euid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresuid16(suid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +165: __NR_getresuid 3s 3m +----------------------------------------------------- + +Syscall param getresuid16(ruid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresuid16(euid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresuid16(suid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresuid16(ruid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresuid16(euid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresuid16(suid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +167: __NR_query_module 0e +----------------------------------------------------- +----------------------------------------------------- +170: __NR_setresgid 3s 0m +----------------------------------------------------- + +Syscall param setresgid16(rgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresgid16(egid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresgid16(sgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +171: __NR_getresgid 3s 3m +----------------------------------------------------- + +Syscall param getresgid16(rgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresgid16(egid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresgid16(sgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresgid16(rgid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresgid16(egid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresgid16(sgid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +174: __NR_rt_sigaction 4s 2m +----------------------------------------------------- + +Syscall param rt_sigaction(signum) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param rt_sigaction(act) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param rt_sigaction(oldact) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param rt_sigaction(sigsetsize) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param rt_sigaction(act) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param rt_sigaction(oldact) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +182: __NR_chown 3s 1m +----------------------------------------------------- + +Syscall param chown16(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chown16(owner) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chown16(group) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chown16(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +191: __NR_ugetrlimit 2s 1m +----------------------------------------------------- + +Syscall param getrlimit(resource) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getrlimit(rlim) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getrlimit(rlim) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +195: __NR_stat64 2s 2m +----------------------------------------------------- + +Syscall param stat64(file_name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param stat64(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param stat64(file_name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param stat64(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +196: __NR_lstat64 2s 2m +----------------------------------------------------- + +Syscall param lstat64(file_name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lstat64(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lstat64(file_name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lstat64(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +197: __NR_fstat64 2s 1m +----------------------------------------------------- + +Syscall param fstat64(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fstat64(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fstat64(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +198: __NR_lchown32 3s 1m +----------------------------------------------------- + +Syscall param lchown(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lchown(owner) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lchown(group) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lchown(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +199: __NR_getuid32 0e +----------------------------------------------------- diff --git a/memcheck/tests/scalar4.vgtest b/memcheck/tests/scalar4.vgtest new file mode 100644 index 0000000000..b0545eb0b7 --- /dev/null +++ b/memcheck/tests/scalar4.vgtest @@ -0,0 +1,2 @@ +prog: scalar4 +vgopts: -q diff --git a/memcheck/tests/scalar5.c b/memcheck/tests/scalar5.c new file mode 100644 index 0000000000..0b96cb3d4a --- /dev/null +++ b/memcheck/tests/scalar5.c @@ -0,0 +1,216 @@ + +#include "scalar.h" + +int main(void) +{ + // uninitialised, but we know px[0] is 0x0 + long* px = malloc(sizeof(long)); + long x0 = px[0]; + + // All __NR_xxx numbers are taken from x86 + + // 200--249 + + // __NR_getgid32 200 --> sys_getgid() + GO(__NR_getgid32, "0e"); + SY(__NR_getgid32); + + // __NR_geteuid32 201 --> sys_geteuid() + GO(__NR_geteuid32, "0e"); + SY(__NR_geteuid32); + + // __NR_getegid32 202 --> sys_getegid() + GO(__NR_getegid32, "0e"); + SY(__NR_getegid32); + + // __NR_setreuid32 203 + GO(__NR_setreuid32, "2s 0m"); + SY(__NR_setreuid32, x0, x0); + + // __NR_setregid32 204 + GO(__NR_setregid32, "2s 0m"); + SY(__NR_setregid32, x0, x0); + + // __NR_getgroups32 205 --> sys_getgroups() + GO(__NR_getgroups32, "2s 1m"); + SY(__NR_getgroups32, x0+1, x0+1); + + // __NR_setgroups32 206 --> sys_setgroups() + GO(__NR_setgroups32, "2s 1m"); + SY(__NR_setgroups32, x0+1, x0+1); + + // __NR_fchown32 207 --> sys_fchown() + GO(__NR_fchown32, "3s 0m"); + SY(__NR_fchown32, x0, x0, x0); + + // __NR_setresuid32 208 --> sys_setresuid() + GO(__NR_setresuid32, "3s 0m"); + SY(__NR_setresuid32, x0, x0, x0); + + // __NR_getresuid32 209 --> sys_getresuid() + GO(__NR_getresuid32, "3s 3m"); + SY(__NR_getresuid32, x0, x0, x0); + + // __NR_setresgid32 210 --> sys_setresgid() + GO(__NR_setresgid32, "3s 0m"); + SY(__NR_setresgid32, x0, x0, x0); + + // __NR_getresgid32 211 --> sys_getresgid() + GO(__NR_getresgid32, "3s 3m"); + SY(__NR_getresgid32, x0, x0, x0); + + // __NR_chown32 212 --> sys_chown() + GO(__NR_chown32, "3s 1m"); + SY(__NR_chown32, x0, x0, x0); + + // __NR_setuid32 213 --> sys_setuid() + GO(__NR_setuid32, "1s 0m"); + SY(__NR_setuid32, x0); + + // __NR_setgid32 214 + GO(__NR_setgid32, "1s 0m"); + SY(__NR_setgid32, x0); + + // __NR_setfsuid32 215 --> sys_setfsuid() + GO(__NR_setfsuid32, "1s 0m"); + SY(__NR_setfsuid32, x0); + + // __NR_setfsgid32 216 --> sys_setfsgid() + GO(__NR_setfsgid32, "1s 0m"); + SY(__NR_setfsgid32, x0); + + // __NR_pivot_root 217 + //GO(__NR_pivot_root, ".s .m"); + //SY(__NR_pivot_root); + + // __NR_mincore 218 + //GO(__NR_mincore, ".s .m"); + //SY(__NR_mincore); + + // __NR_madvise 219 + //GO(__NR_madvise, ".s .m"); + //SY(__NR_madvise); + + // __NR_getdents64 220 + //GO(__NR_getdents64, ".s .m"); + //SY(__NR_getdents64); + + // __NR_fcntl64 221 + //GO(__NR_fcntl64, ".s .m"); + //SY(__NR_fcntl64); + + // 222 --> sys_ni_syscall() + GO(222, "0e"); + SY(222); + + // 223 --> sys_ni_syscall() + GO(223, "0e"); + SY(223); + + // __NR_gettid 224 + //GO(__NR_gettid, ".s .m"); + //SY(__NR_gettid); + + // __NR_readahead 225 + //GO(__NR_readahead, ".s .m"); + //SY(__NR_readahead); + + // __NR_setxattr 226 --> sys_xattr() + GO(__NR_setxattr, "5s 3m"); + SY(__NR_setxattr, x0, x0, x0, x0+1, x0); + + // __NR_lsetxattr 227 --> sys_lsetxattr() + GO(__NR_lsetxattr, "5s 3m"); + SY(__NR_lsetxattr, x0, x0, x0, x0+1, x0); + + // __NR_fsetxattr 228 --> sys_fsetxattr() + GO(__NR_fsetxattr, "5s 2m"); + SY(__NR_fsetxattr, x0, x0, x0, x0+1, x0); + + // __NR_getxattr 229 --> sys_getxattr() + GO(__NR_getxattr, "4s 3m"); + SY(__NR_getxattr, x0, x0, x0, x0+1); + + // __NR_lgetxattr 230 --> sys_lgetxattr() + GO(__NR_lgetxattr, "4s 3m"); + SY(__NR_lgetxattr, x0, x0, x0, x0+1); + + // __NR_fgetxattr 231 --> sys_fgetxattr() + GO(__NR_fgetxattr, "4s 2m"); + SY(__NR_fgetxattr, x0, x0, x0, x0+1); + + // __NR_listxattr 232 --> sys_listxattr() + GO(__NR_listxattr, "3s 2m"); + SY(__NR_listxattr, x0, x0, x0+1); + + // __NR_llistxattr 233 --> sys_llistxattr() + GO(__NR_llistxattr, "3s 2m"); + SY(__NR_llistxattr, x0, x0, x0+1); + + // __NR_flistxattr 234 --> sys_flistxattr() + GO(__NR_flistxattr, "3s 1m"); + SY(__NR_flistxattr, x0, x0, x0+1); + + // __NR_removexattr 235 --> sys_removexattr() + GO(__NR_removexattr, "2s 2m"); + SY(__NR_removexattr, x0, x0); + + // __NR_lremovexattr 236 --> sys_lremovexattr() + GO(__NR_lremovexattr, "2s 2m"); + SY(__NR_lremovexattr, x0, x0); + + // __NR_fremovexattr 237 --> sys_fremovexattr() + GO(__NR_fremovexattr, "2s 1m"); + SY(__NR_fremovexattr, x0, x0); + + // __NR_tkill 238 + //GO(__NR_tkill, ".s .m"); + //SY(__NR_tkill); + + // __NR_sendfile64 239 + //GO(__NR_sendfile64, ".s .m"); + //SY(__NR_sendfile64); + + // __NR_futex 240 + //GO(__NR_futex, ".s .m"); + //SY(__NR_futex); + + // __NR_sched_setaffinity 241 + //GO(__NR_sched_setaffinity, ".s .m"); + //SY(__NR_sched_setaffinity); + + // __NR_sched_getaffinity 242 + //GO(__NR_sched_getaffinity, ".s .m"); + //SY(__NR_sched_getaffinity); + + // __NR_set_thread_area 243 + //GO(__NR_set_thread_area, ".s .m"); + //SY(__NR_set_thread_area); + + // __NR_get_thread_area 244 + //GO(__NR_get_thread_area, ".s .m"); + //SY(__NR_get_thread_area); + + // __NR_io_setup 245 + //GO(__NR_io_setup, ".s .m"); + //SY(__NR_io_setup); + + // __NR_io_destroy 246 + //GO(__NR_io_destroy, ".s .m"); + //SY(__NR_io_destroy); + + // __NR_io_getevents 247 + //GO(__NR_io_getevents, ".s .m"); + //SY(__NR_io_getevents); + + // __NR_io_submit 248 + //GO(__NR_io_submit, ".s .m"); + //SY(__NR_io_submit); + + // __NR_io_cancel 249 + //GO(__NR_io_cancel, ".s .m"); + //SY(__NR_io_cancel); + + return 0; +} + diff --git a/memcheck/tests/scalar5.stderr.exp b/memcheck/tests/scalar5.stderr.exp new file mode 100644 index 0000000000..957f967ffa --- /dev/null +++ b/memcheck/tests/scalar5.stderr.exp @@ -0,0 +1,665 @@ +----------------------------------------------------- +200: __NR_getgid32 0e +----------------------------------------------------- +----------------------------------------------------- +201: __NR_geteuid32 0e +----------------------------------------------------- +----------------------------------------------------- +202: __NR_getegid32 0e +----------------------------------------------------- +----------------------------------------------------- +203: __NR_setreuid32 2s 0m +----------------------------------------------------- +Syscall param setreuid(ruid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setreuid(euid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +204: __NR_setregid32 2s 0m +----------------------------------------------------- + +Syscall param setregid(rgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setregid(egid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +205: __NR_getgroups32 2s 1m +----------------------------------------------------- + +Syscall param getgroups(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getgroups(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getgroups(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +206: __NR_setgroups32 2s 1m +----------------------------------------------------- + +Syscall param setgroups(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setgroups(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setgroups(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +207: __NR_fchown32 3s 0m +----------------------------------------------------- + +Syscall param fchown(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fchown(owner) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fchown(group) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +208: __NR_setresuid32 3s 0m +----------------------------------------------------- + +Syscall param setresuid(ruid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresuid(euid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresuid(suid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +209: __NR_getresuid32 3s 3m +----------------------------------------------------- + +Syscall param getresuid(ruid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresuid(euid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresuid(suid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresuid(ruid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresuid(euid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresuid(suid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +210: __NR_setresgid32 3s 0m +----------------------------------------------------- + +Syscall param setresgid(rgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresgid(egid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setresgid(sgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +211: __NR_getresgid32 3s 3m +----------------------------------------------------- + +Syscall param getresgid(rgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresgid(egid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresgid(sgid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getresgid(rgid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresgid(egid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getresgid(sgid) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +212: __NR_chown32 3s 1m +----------------------------------------------------- + +Syscall param chown(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chown(owner) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chown(group) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param chown(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +213: __NR_setuid32 1s 0m +----------------------------------------------------- + +Syscall param setuid(uid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +214: __NR_setgid32 1s 0m +----------------------------------------------------- + +Syscall param setgid(gid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +215: __NR_setfsuid32 1s 0m +----------------------------------------------------- + +Syscall param setfsuid(uid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +216: __NR_setfsgid32 1s 0m +----------------------------------------------------- + +Syscall param setfsgid(gid) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... +----------------------------------------------------- +222: 222 0e +----------------------------------------------------- +----------------------------------------------------- +223: 223 0e +----------------------------------------------------- +----------------------------------------------------- +226: __NR_setxattr 5s 3m +----------------------------------------------------- + +Syscall param setxattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setxattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setxattr(value) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setxattr(flags) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param setxattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param setxattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param setxattr(value) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +227: __NR_lsetxattr 5s 3m +----------------------------------------------------- + +Syscall param lsetxattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lsetxattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lsetxattr(value) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +More than 50 errors detected. Subsequent errors +will still be recorded, but in less detail than before. + +Syscall param lsetxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lsetxattr(flags) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lsetxattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lsetxattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lsetxattr(value) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +228: __NR_fsetxattr 5s 2m +----------------------------------------------------- + +Syscall param fsetxattr(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fsetxattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fsetxattr(value) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fsetxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fsetxattr(flags) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fsetxattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param fsetxattr(value) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +229: __NR_getxattr 4s 3m +----------------------------------------------------- + +Syscall param getxattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getxattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getxattr(value) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param getxattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getxattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getxattr(value) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +230: __NR_lgetxattr 4s 3m +----------------------------------------------------- + +Syscall param lgetxattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lgetxattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lgetxattr(value) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lgetxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lgetxattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lgetxattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lgetxattr(value) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +231: __NR_fgetxattr 4s 2m +----------------------------------------------------- + +Syscall param fgetxattr(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fgetxattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fgetxattr(value) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fgetxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fgetxattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param fgetxattr(value) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +232: __NR_listxattr 3s 2m +----------------------------------------------------- + +Syscall param listxattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param listxattr(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param listxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param listxattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param listxattr(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +233: __NR_llistxattr 3s 2m +----------------------------------------------------- + +Syscall param llistxattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param llistxattr(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param llistxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param llistxattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param llistxattr(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +234: __NR_flistxattr 3s 1m +----------------------------------------------------- + +Syscall param flistxattr(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param flistxattr(list) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param flistxattr(size) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param flistxattr(list) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +235: __NR_removexattr 2s 2m +----------------------------------------------------- + +Syscall param removexattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param removexattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param removexattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param removexattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +236: __NR_lremovexattr 2s 2m +----------------------------------------------------- + +Syscall param lremovexattr(path) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lremovexattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lremovexattr(path) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lremovexattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +237: __NR_fremovexattr 2s 1m +----------------------------------------------------- + +Syscall param fremovexattr(fd) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fremovexattr(name) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param fremovexattr(name) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd diff --git a/memcheck/tests/scalar5.vgtest b/memcheck/tests/scalar5.vgtest new file mode 100644 index 0000000000..1ac875cb55 --- /dev/null +++ b/memcheck/tests/scalar5.vgtest @@ -0,0 +1,2 @@ +prog: scalar5 +vgopts: -q diff --git a/memcheck/tests/scalar6.c b/memcheck/tests/scalar6.c new file mode 100644 index 0000000000..b41b6082c5 --- /dev/null +++ b/memcheck/tests/scalar6.c @@ -0,0 +1,158 @@ + +#include "scalar.h" + +int main(void) +{ + // uninitialised, but we know px[0] is 0x0 + long* px = malloc(sizeof(long)); + long x0 = px[0]; + + // All __NR_xxx numbers are taken from x86 + + // 250--299 + + // __NR_fadvise64 250 + //GO(__NR_fadvise64, ".s .m"); + //SY(__NR_fadvise64); + + // 251 --> sys_ni_syscall() + GO(251, "0e"); + SY(251); + + // __NR_exit_group 252 + // See below + + // __NR_lookup_dcookie 253 --> sys_lookup_dcookie() + GO(__NR_lookup_dcookie, "4s 1m"); + SY(__NR_lookup_dcookie, x0, x0, x0, x0+1); + + // __NR_epoll_create 254 + //GO(__NR_epoll_create, ".s .m"); + //SY(__NR_epoll_create); + + // __NR_epoll_ctl 255 + //GO(__NR_epoll_ctl, ".s .m"); + //SY(__NR_epoll_ctl); + + // __NR_epoll_wait 256 + //GO(__NR_epoll_wait, ".s .m"); + //SY(__NR_epoll_wait); + + // __NR_remap_file_pages 257 + //GO(__NR_remap_file_pages, ".s .m"); + //SY(__NR_remap_file_pages); + + // __NR_set_tid_address 258 + //GO(__NR_set_tid_address, ".s .m"); + //SY(__NR_set_tid_address); + + // __NR_timer_create 259 + //GO(__NR_timer_create, ".s .m"); + //SY(__NR_timer_create); + + // __NR_timer_settime (__NR_timer_create+1) + //GO(__NR_timer_settime, ".s .m"); + //SY(__NR_timer_settime); + + // __NR_timer_gettime (__NR_timer_create+2) + //GO(__NR_timer_gettime, ".s .m"); + //SY(__NR_timer_gettime); + + // __NR_timer_getoverrun (__NR_timer_create+3) + //GO(__NR_timer_getoverrun, ".s .m"); + //SY(__NR_timer_getoverrun); + + // __NR_timer_delete (__NR_timer_create+4) + //GO(__NR_timer_delete, ".s .m"); + //SY(__NR_timer_delete); + + // __NR_clock_settime (__NR_timer_create+5) + //GO(__NR_clock_settime, ".s .m"); + //SY(__NR_clock_settime); + + // __NR_clock_gettime (__NR_timer_create+6) + //GO(__NR_clock_gettime, ".s .m"); + //SY(__NR_clock_gettime); + + // __NR_clock_getres (__NR_timer_create+7) + //GO(__NR_clock_getres, ".s .m"); + //SY(__NR_clock_getres); + + // __NR_clock_nanosleep (__NR_timer_create+8) + //GO(__NR_clock_nanosleep, ".s .m"); + //SY(__NR_clock_nanosleep); + + // __NR_statfs64 268 + //GO(__NR_statfs64, ".s .m"); + //SY(__NR_statfs64); + + // __NR_fstatfs64 269 + //GO(__NR_fstatfs64, ".s .m"); + //SY(__NR_fstatfs64); + + // __NR_tgkill 270 + //GO(__NR_tgkill, ".s .m"); + //SY(__NR_tgkill); + + // __NR_utimes 271 + //GO(__NR_utimes, ".s .m"); + //SY(__NR_utimes); + + // __NR_fadvise64_64 272 + //GO(__NR_fadvise64_64, ".s .m"); + //SY(__NR_fadvise64_64); + + // __NR_vserver 273 --> sys_ni_syscall() + //GO(__NR_vserver, "0e"); + //SY(__NR_vserver); + + // __NR_mbind 274 + //GO(__NR_mbind, ".s .m"); + //SY(__NR_mbind); + + // __NR_get_mempolicy 275 + //GO(__NR_get_mempolicy, ".s .m"); + //SY(__NR_get_mempolicy); + + // __NR_set_mempolicy 276 + //GO(__NR_set_mempolicy, ".s .m"); + //SY(__NR_set_mempolicy); + + // __NR_mq_open 277 + //GO(__NR_mq_open, ".s .m"); + //SY(__NR_mq_open); + + // __NR_mq_unlink (__NR_mq_open+1) + //GO(__NR_mq_unlink, ".s .m"); + //SY(__NR_mq_unlink); + + // __NR_mq_timedsend (__NR_mq_open+2) + //GO(__NR_mq_timedsend, ".s .m"); + //SY(__NR_mq_timedsend); + + // __NR_mq_timedreceive (__NR_mq_open+3) + //GO(__NR_mq_timedreceive, ".s .m"); + //SY(__NR_mq_timedreceive); + + // __NR_mq_notify (__NR_mq_open+4) + //GO(__NR_mq_notify, ".s .m"); + //SY(__NR_mq_notify); + + // __NR_mq_getsetattr (__NR_mq_open+5) + //GO(__NR_mq_getsetattr, ".s .m"); + //SY(__NR_mq_getsetattr); + + // __NR_sys_kexec_load 283 --> sys_ni_syscall() + //GO(__NR_sys_kexec_load, "0e"); + //SY(__NR_sys_kexec_load); + + GO(9999, "1e"); + SY(9999); + + // __NR_exit 252 --> sys_exit_group() + GO(__NR_exit_group, "1s 0m"); + SY(__NR_exit_group, x0); + + assert(0); +} + diff --git a/memcheck/tests/scalar6.stderr.exp b/memcheck/tests/scalar6.stderr.exp new file mode 100644 index 0000000000..483fb684f9 --- /dev/null +++ b/memcheck/tests/scalar6.stderr.exp @@ -0,0 +1,45 @@ +----------------------------------------------------- +251: 251 0e +----------------------------------------------------- +----------------------------------------------------- +253: __NR_lookup_dcookie 4s 1m +----------------------------------------------------- +Syscall param lookup_dcookie(cookie_low32) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lookup_dcookie(cookie_high32) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lookup_dcookie(buf) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lookup_dcookie(len) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + +Syscall param lookup_dcookie(buf) points to unaddressable byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd +----------------------------------------------------- +9999: 9999 1e +----------------------------------------------------- +WARNING: unhandled syscall: 9999 +Do not panic. You may be able to fix this easily. +Read the file README_MISSING_SYSCALL_OR_IOCTL. +----------------------------------------------------- +252: __NR_exit_group 1s 0m +----------------------------------------------------- + +Syscall param exit_group(error_code) contains uninitialised byte(s) + at 0x........: syscall (in /...libc...) + by 0x........: __libc_start_main (...libc...) + by 0x........: ... diff --git a/memcheck/tests/scalar6.vgtest b/memcheck/tests/scalar6.vgtest new file mode 100644 index 0000000000..f54b17dc9c --- /dev/null +++ b/memcheck/tests/scalar6.vgtest @@ -0,0 +1,2 @@ +prog: scalar6 +vgopts: -q diff --git a/memcheck/tests/scalar.supp b/memcheck/tests/scalar_supp.supp similarity index 100% rename from memcheck/tests/scalar.supp rename to memcheck/tests/scalar_supp.supp diff --git a/memcheck/tests/scalar_supp.vgtest b/memcheck/tests/scalar_supp.vgtest index c0602756e8..49bd4b02b6 100644 --- a/memcheck/tests/scalar_supp.vgtest +++ b/memcheck/tests/scalar_supp.vgtest @@ -1,2 +1,2 @@ prog: scalar_supp -vgopts: -q --suppressions=scalar.supp +vgopts: -q --suppressions=scalar_supp.supp