wasmtime
wasmtime copied to clipboard
wasmtime: Add a config knob to control the maximum number of stack frames captured in a backtrace
Would make capturing a backtrace go from O(n) where n is the number of Wasm frames on the stack to constant time for some user-defined acceptable constant. Max frames could be set to zero to disable backtraces completely. Would subsume the current (and deprecated) Config::wasm_backtrace method.
Follow up to #5049.
cc @Stebalien
FWIW, last time I looked, V8 would only capture 20 stack frames in its JS error stacks. Relevant precedent.