C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Function Pointer from Lambda with Captures

From: Edward Catmur <ecatmur_at_[hidden]>
Date: Sun, 16 Apr 2023 09:50:09 -0300
On Sun, 16 Apr 2023 at 09:45, Thiago Macieira via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Sunday, 16 April 2023 09:20:24 -03 Thiago Macieira via Std-Proposals
> wrote:
> > JIT is a reliable solution for all applications, because in hardened
> systems
> > it's completely prohibited: the system calls that would allow you to
> change
> > a page's attributes are denied.
>
> I meant: "JIT is unreliable for all".
>
> By that, I mean that it works for a lot of applications, but not the
> totality,
> even in the same system. The same hardened server may be running Node.js
> (which uses the Chromium V8 JavaScript engine, which JITs) and have
> applications hardened by SELinux that prohibits JIT. So the problem is not
> the
> OS or the CPU, it's individual installations. JIT is something that
> *applications* may choose to do, not libraries. C and C++ Libraries must
> see
> JIT as an optimisation they have a graceful fail-over for, at runtime.
>

There are also platforms where JIT is completely impossible - libffi says
m32r is one such.

I don't see how your proposal or _Wide can have a fail-over, because if
> they
> did, they wouldn't be necessary in the first place. Therefore, DOA.
>

I think you misunderstand _Wide; it looks to me like it's a fat pointer,
essentially passing pair<R(*)(A...), void*>.

Received on 2023-04-16 12:50:22