[PATCH v3 2/2] tests: Workaroud for buggy glibc in ipc_msg test on ppc64
Andreas Schwab
schwab at suse.de
Tue Sep 13 07:59:20 UTC 2016
On Sep 13 2016, Eugene Syromyatnikov <evgsyr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> On Tue, Sep 13, 2016 at 7:32 AM, Andreas Schwab <schwab-l3A5Bk7waGM at public.gmane.org> wrote:
>> On Sep 13 2016, Eugene Syromyatnikov <evgsyr-Re5JQEeQqe8AvxtiuMwx3w-XMD5yJDbdMReXY1tMh2IBg at public.gmane.org> wrote:
>>
>>> glibc before 2.23 (glibc-2.22-122-gbe48165? to be more precise) tried to access
>>> data pointed by third argument of msgctl call on 64-bit PowerPC which led to
>>> segmentataion fault (instead of EFAULT from kernel).
>>
>> Which is a perfectly valid thing to do, as passing an invalid pointer to
>> msgctl (the libc function) invokes undefined behaviour. If you want to
>> test the kernel behaviour you need to talk to the kernel directly.
> Well, http://man7.org/linux/man-pages/man2/msgctl.2.html documents
> this case as EFAULT (and I assume it documents glibc wrapper since it
> usually does so and kernel interface is architecture-dependent).
Section 2 manpages document the kernel syscalls. You can never count on
EFAULT unless talking to the kernel directly.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
More information about the Strace-devel
mailing list