[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problems with daily images

From: Jessica Clarke
Subject: Re: problems with daily images
Date: Sun, 24 Jan 2021 01:16:13 +0000

On 24 Jan 2021, at 00:59, Jessica Clarke <jrtc27@jrtc27.com> wrote:
> On 24 Jan 2021, at 00:41, Damien Zammit <damien@zamaudio.com> wrote:
>> Hi,
>> On 24/1/21 11:28 am, Samuel Thibault wrote:
>>> Why so? We do support SSE*.
>>> (glibc 2.33 will even use them automatically for memcpy etc. thanks to
>>> ifunc support recently getting enabled)
>> OK, I ran the failing test in GDB:
>> initmaster(int f UNUSED)
>> {
>> #ifndef VMS
>> # ifdef POSIX
>>   tcflush(f, TCIOFLUSH);
>> # else
>> #  ifdef TIOCFLUSH
>>   (void)ioctl(f, TIOCFLUSH, (char *) 0);
> It seems only QNX ends up setting POSIX for some inexplicable reason.
> Since Hurd defines TIOCFLUSH, it ends up calling this line. But
> TIOCFLUSH takes an int * pointing at flags, so when converting the
> ioctl into an RPC it'll dereference the null pointer and segfault. It
> should either pass a pointer to an int with the right flags or just use
> tcflush like a sane program.
> NB: Neither Linux nor FreeBSD define/implement TIOCFLUSH.

Ah I got that wrong, TIOCEXCL is the one that neither define. Linux
doesn't define TIOCFLUSH, but FreeBSD does. The ioctl originally took
no arguments, but was changed in July 1981[1] to take the int *, which
would have been in 4.2BSD but not 4.1BSD. The null check exists to this
day in FreeBSD for backwards compatibility. It's probably time that vim
update itself to the more modern form (nowhere is it documented that
passing NULL is permitted, so you're just relying on systems silently
providing API compatibility with 4.1BSD and earlier), but maybe Hurd
should also be nice.


[1] https://svnweb.freebsd.org/csrg/sys/kern/tty.c?r1=3941&r2=3942

reply via email to

[Prev in Thread] Current Thread [Next in Thread]