[PATCH] tests: disable testing msgctl with invalid addresses on s390

Sven Schnelle svens at linux.ibm.com
Tue Nov 10 20:22:08 UTC 2020


"Dmitry V. Levin" <ldv at altlinux.org> writes:

> On Tue, Nov 10, 2020 at 11:48:59AM +0100, Sven Schnelle wrote:
>> On s390, libc segfaults when invalid addresses are passed to
>> msgctl in the ipc_msg.c test case. Therefore disable that test.
>
> Hmm, that's surprising.  What's the libc that behaves this way?  At least
> glibc doesn't seem to have anything specific to s390 in its implementation
> of msgctl.

It's Fedora 32 with glibc-2.31. It's only happening in 31 Bit mode,
backtrace looks like this:

gdb) bt
#0  0x7df28298 in __new_msgctl (msqid=0xfdb97531, cmd=cmd at entry=0x1, buf=buf at entry=0xffffffff) at ../sysdeps/unix/sysv/linux/msgctl.c:57
#1  0x00400786 in main () at ipc_msg.c:199
(gdb) x/i $pc
=> 0x7df28298 <__new_msgctl+40>:	mvc	100(88,%r15),0(%r4)
(gdb) print $r4
$2 = 0xffffffff

So it tries to copy buf, but that fails because buf isn't a valid
pointer. I admit that i didn't look into the source because it's
happening only in 31 bit compat mode, which is only rarely used
nowadays. So i thought it's easiest to just disable the test.

Sven


More information about the Strace-devel mailing list