C++ Logo


Advanced search

Subject: Re: [std-proposals] Adding stacktrace to std::exception
From: Thiago Macieira (thiago_at_[hidden])
Date: 2020-11-13 00:53:49

On Thursday, 12 November 2020 06:14:52 PST Antony Polukhin via Std-Proposals
> 1) Implement __cxa_allocate_exception2 that allocates (see note 0)
> additional space (see note 1) to store the stacktrace AND puts a mark
> (see note 2) into the allocated memory, that this is an exception with
> a stacktrace

Another note: one condition for throwing exceptions is being out of memory. So
the implementation must figure out how to throw an exception when it can't
allocate space for the stack trace.

Also, stack traces' size are not known at compile time, unlike exceptions

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups