Annotation of parser3/tests/458.html, revision 1.1

1.1     ! moko        1: # Every ^nest level runs away in the try body, and the next one starts from its catch code,
        !             2: # that is inside a handler which has not returned yet. Nesting handlers does not raise the
        !             3: # recursion depth, but MSVC win64 keeps the unwound frames until the catch block returns, so
        !             4: # each nested runaway costs one more full stack budget, ~10MB with the default max_recursion(1000).
        !             5: # Four levels already overflow a 40MB stack there, while linux needs the same 900KB for any depth.
        !             6: # In summary, win64 EH is awful: it unwinds the C++ stack but not its own state, so the program dies
        !             7: # escaping a recursion that fit the stack with room to spare, and the crash points to the wrong place.
        !             8: @main[]
        !             9: $nested(0)
        !            10: ^try{ ^nest(3) }{ $exception.handled(true) }
        !            11: nested $nested
        !            12: 
        !            13: @nest[level]
        !            14: ^if($level>0){
        !            15:        ^try{ ^recurse[] }{
        !            16:                $nested($nested+1)
        !            17:                ^nest($level-1)
        !            18:        }
        !            19: }
        !            20: 
        !            21: @recurse[]
        !            22: ^recurse[]

E-mail: