interp recursionlimit {} 0x7fffffff
proc a { max } {
    if { [info level] < $max } {
	set ::depth [info level]
	a $max
    } else {
	regexp {^ ?} x
    }
}
catch { a 99999 }
set depth2 $depth
puts [list [catch { a $::depth } result }] $result [expr { $depth2 - $depth }]]

