]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Illumos regtest: getrandom uses a different syscall number from Solaris
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 16 Feb 2025 06:57:43 +0000 (07:57 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sun, 16 Feb 2025 06:57:43 +0000 (07:57 +0100)
It doesn't look like the syscall interface changed, just the number.

coregrind/m_syswrap/syswrap-solaris.c
memcheck/tests/solaris/Makefile.am
memcheck/tests/solaris/scalar_getrandom.stderr.exp-illumos [new file with mode: 0644]

index faeea15f54d694f5de97a3b769ced8128e8d2138..3da0d216cd7fc8093d0654dcd05441ba90d4a09c 100644 (file)
@@ -10947,7 +10947,7 @@ static SyscallTableEntry syscall_table[] = {
    SOLXY(__NR_uuidsys,              sys_uuidsys),               /* 124 */
 #endif /* SOLARIS_UUIDSYS_SYSCALL */
 #if defined(HAVE_MREMAP)
-   GENX_(__NR_mremap,               sys_mremap),                /* 126 */
+   GENX_(__NR_mremap,               sys_mremap),                /* 126 (Solaris only, not Illumos) */
 #endif /* HAVE_MREMAP */
    SOLX_(__NR_mmapobj,              sys_mmapobj),               /* 127 */
    GENX_(__NR_setrlimit,            sys_setrlimit),             /* 128 */
@@ -10968,7 +10968,7 @@ static SyscallTableEntry syscall_table[] = {
    SOLX_(__NR_seteuid,              sys_seteuid),               /* 141 */
    SOLX_(__NR_forksys,              sys_forksys),               /* 142 */
 #if defined(SOLARIS_GETRANDOM_SYSCALL)
-   SOLXY(__NR_getrandom,            sys_getrandom),             /* 143 */
+   SOLXY(__NR_getrandom,            sys_getrandom),             /* 143 (Solaris) 126 (Illumos) */
 #endif /* SOLARIS_GETRANDOM_SYSCALL */
    SOLXY(__NR_sigtimedwait,         sys_sigtimedwait),          /* 144 */
    SOLX_(__NR_yield,                sys_yield),                 /* 146 */
index 7cf1ac07ce84352a9a97b9c774a54dc914f55763..0c0d551ed07faba57c5409e8abe320145fae841b 100644 (file)
@@ -34,6 +34,7 @@ EXTRA_DIST = \
        scalar_auditon_stat.stderr.exp scalar_auditon_stat.stdout.exp scalar_auditon_stat.vgtest \
        scalar_frealpathat.stderr.exp scalar_frealpathat.stdout.exp scalar_frealpathat.vgtest \
        scalar_getrandom.stderr.exp scalar_getrandom.stdout.exp scalar_getrandom.vgtest \
+       scalar_getrandom.stderr.exp-illumos \
        scalar_ioctl.stderr.exp scalar_ioctl.stdout.exp scalar_ioctl.vgtest \
        scalar_lwp_kill.stderr.exp scalar_lwp_kill.stdout.exp scalar_lwp_kill.vgtest \
        scalar_lwp_name.stderr.exp scalar_lwp_name.stdout.exp scalar_lwp_name.vgtest \
diff --git a/memcheck/tests/solaris/scalar_getrandom.stderr.exp-illumos b/memcheck/tests/solaris/scalar_getrandom.stderr.exp-illumos
new file mode 100644 (file)
index 0000000..7e84a48
--- /dev/null
@@ -0,0 +1,16 @@
+---------------------------------------------------------
+126:           SYS_getrandom (getrandom) 3s 1m
+---------------------------------------------------------
+Syscall param getrandom(buf) contains uninitialised byte(s)
+   ...
+
+Syscall param getrandom(buflen) contains uninitialised byte(s)
+   ...
+
+Syscall param getrandom(flags) contains uninitialised byte(s)
+   ...
+
+Syscall param getrandom(buf) points to unaddressable byte(s)
+   ...
+ Address 0x........ is not stack'd, malloc'd or (recently) free'd
+