C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] Adding stacktrace to std::exception
From: Henry Miller (hank_at_[hidden])
Date: 2020-11-13 10:43:25


The default needs to be 0: not all C++ systems are PCs with a ton of memory, some of us have to fight for single bytes. I also have to deal with early 1990s encryption what is insecure for now-obsolete legal reasons and everything I can do to keep those details private by default is important.

-- 
  Henry Miller
  hank_at_[hidden]
On Fri, Nov 13, 2020, at 10:24, Thiago Macieira via Std-Proposals wrote:
> On Friday, 13 November 2020 00:56:39 PST Marcin Jaczewski wrote:
> > > Also, stack traces' size are not known at compile time, unlike exceptions
> > > classes.
> > 
> > Do we need a full stack trace to be this useful?
> > Let say that Standard guarantees only last 20 positions from it.
> > Rest will be available only if there is free memory for it.
> 
> Don't ask me. But this is a reasonable question: what is the minimum viable 
> solution in case memory allocation fails? Is a backtrace simply a pointer per 
> frame?
> 
> Note that increasing the size of the emergency per-thread exception buffer 
> means memory gets allocated for everyone, whether they use it or not. There's 
> a cost in this. Adding 20 pointers (160 bytes) may not be too bad, except ... 
> you know... when you're out of memory. So the fact that you reserved space for 
> when you're out of memory could be the cause that you're out of memory.
> 
> -- 
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel DPG Cloud Engineering
> 
> 
> 
> -- 
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

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

Standard Proposals Archives on Google Groups