wasmtime icon indicating copy to clipboard operation
wasmtime copied to clipboard

wasmtime: Add a config knob to control the maximum number of stack frames captured in a backtrace

Open fitzgen opened this issue 3 years ago • 2 comments

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.

fitzgen avatar Oct 13 '22 14:10 fitzgen

cc @Stebalien

fitzgen avatar Oct 13 '22 14:10 fitzgen

FWIW, last time I looked, V8 would only capture 20 stack frames in its JS error stacks. Relevant precedent.

fitzgen avatar Oct 13 '22 14:10 fitzgen