Subject: bug#24617: 26.0.50; Handlers in `condition-case' should have programmatic access to the backtrace

From: Clément Pit--Claudel <[email-masked]>
Date: Thu, 29 Dec 2016 15:02:53 +0100

On 12/29/2016 10:01 AM, Helmut Eller wrote:
>>     Second, unconditionally copying the backtrace would be expensive
>>
>> Are you sure about that?
>
> No, but I would be surprised if it were cheap.

Collecting the textual backtrace (by calling 'backtrace') can take arbitrarily long, because it includes arguments, which can be large strings. I've run into this (99% of the time was spent on collecting backtraces).

Collecting a full backtrace with backtrace-frame (as objects) is quadratic, but I don't know if that matters.  The master branch has mapbacktrace, which solves the quadratic part.

Clément.