Hi Denis, >> Adding support for a frame chain would require an ABI change. It > would have to > > work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of > > effort.
> Clang already works that way. No, that's incorrect like Richard pointed out. Only a single register can be used as the frame chain. > If we change the size of the traces to 2, it could be something like this: ... > At the first example we lost the full context, from where the > control/data flow comes from. If 2 is not sufficient, then try 3 or 4. It may also be feasible to only enable deeper unwinding for particular libraries so you only pay an extra cost for leaks you are interested in. > The stack layout like this enables only with compile time flag > (-mthumb-fp and works only together with -mthumb and > -fno-omit-frame-pointer). It does not affect other codegen. But any code built like that will *always* run slower even if you don't use the sanitizer. Wilco