Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxynqAh9f332yOSu@voyager>
Date: Sat, 26 Oct 2024 10:26:16 +0200
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: Prototypes without implementations

Am Sat, Oct 26, 2024 at 01:21:23AM +0000 schrieb Laurent Bercot:
>  When the libc provides no implementation, a sysdep test can compile
> and link a program using the API, and conclude that the functionality
> doesn't exist when the link fails. This works when cross-compiling.
>
>  When the libc provides an ENOSYS implementation, the link will succeed,
> and a sysdep test needs to *run* a program to check that the
> functionality works correctly. This is not possible when cross-compiling.
>

I don't understand the remainder of the thread as it is now, because
normally we consider the above behavior to be insanity. Just because a
function exists in the lib does not mean it will succeed at run-time.
This is already the case with functions like getrandom() or pselect().

Even if you could run run-time tests, just because it succeeds at
configure time does not mean it succeeds at any later date. And
conversely, just because it fails at configure time does not mean it
cannot succeed. Writing your software in the above manner is therefore
not sensible. Especially since the functions talked about here are
system calls that on some architectures have been stubbed out in the
kernel, so the run-time behavior depends on run-time kernel version.

But maybe the system calls talked about here are ultra-special in some
way.

Ciao,
Markus

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.