Fix segmentation fault in debug_backtrace()