• Leszek Swirski's avatar
    [turbofan] Move OSR entry stack check before exception ranges · 6a77c346
    Leszek Swirski authored
    The OSR entry stack check is needed as a function entry stack check to
    make sure the call isn't overflowing, but emitting it as part of the
    loop peeling meant that it would be within any exception handler ranges
    that the loop is in.
    
    In particular, this meant that code like this:
    
        try {
          loop {
              OSR();
          }
        } catch {}
    
    would logically insert the entry stack check inside the try, and thus
    stack overflows of the function call would be caught within the
    function, and the function could continue runnning in an overflown
    state.
    
    Bug: chromium:1232875, chromium:1034322
    Change-Id: I846c6f520fd3a897da016132419ad48043859c33
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3056980
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#75958}
    6a77c346
bytecode-graph-builder.cc 181 KB