C++ Logo


Advanced search

Re: [std-proposals] std::typeid_except ( Paper Attached )

From: Tiago Freire <tmiguelf_at_[hidden]>
Date: Sun, 3 Mar 2024 16:37:33 +0000
The standard defines the existence of exceptions, not how exceptions are to be implemented, this feature would have a major impact on how they would need to be implemented.
In any case, even if the committee were to accept this by mistake, it wouldn't actually solve your problem.

Throwing exceptions across dll boundaries has been widely accepted as ill-formed, partly because there's no known form of RTTI that is capable of working correctly in all situation across such boundaries, but mostly because there's no consistency in terms of how exceptions are actually implemented, and adding a previously not required type_info as part of the meta data of the exception would be a clear example of a breakage in binary compatibility, completely blowing up your motivation.

If your goal is to trick inexperienced developers into creating vulnerabilities in applications to generate more out of bounds access opportunities, then by all means this and other previous proposals would do just that.

-----Original Message-----
From: Std-Proposals <std-proposals-bounces_at_lists.isocpp.org> On Behalf Of Frederick Virchanza Gotham via Std-Proposals
Sent: Sunday, March 3, 2024 2:59 PM
To: std-proposals_at_lists.isocpp.org
Cc: Frederick Virchanza Gotham <cauldwell.thomas_at_gmail.com>
Subject: Re: [std-proposals] std::typeid_except ( Paper Attached )

On Sun, Mar 3, 2024 at 1:59 AM Thiago Macieira wrote:
> First, the request is that you add the motivation to the paper, not
> reply by email.

Okay I've edited the paper so that it now has two more motivations:

    * Runtime plugins
    * As a stepping stone

I've changed the 'exception_ptr' parameter from pass-by-value to pass-by-Lvalue-const-ref, and I've made mention of name mangling and anonymous namespaces.

As I've alluded to in the paper, I'm deliberately keeping this paper very basic and simple. All I'm asking for is that we can get 'type_info' from 'exception_ptr'. If I keep this paper very simple and only ask for one thing, then it's more likely to get voted on and accepted. After it has been accepted, further papers can be written to take advantage of having the 'type_info' of unknown exceptions (e.g.
we can talk about getting the 'sizeof' from a 'type_info').

You can see the latest revision of the paper here:


and it's also attached to this email.

Received on 2024-03-03 16:37:36