bug: v/59567 rootcause: add bt memory debug, support memory out-of-bounds check, peak memory printing, and memory leak check