• Michael Starzinger's avatar
    [heap] Fix i-cache flushing operation order. · 64d373e5
    Michael Starzinger authored
    This unifies the order of i-cache flushing and permission changing
    throughout V8. According to cctest/test-icache flushing after the
    permission change is not robust on some ARM32 and ARM64 devices.
    
    There have been observed failures of {TestFlushICacheOfExecutable} on
    some devices. So far there haven't been any observed failures of the
    corresponding {TestFlushICacheOfWritable} test.
    
    Also the order of flushing before the permission change is the natural
    order in which the GC currently performs operations. Until we see
    concrete data substantiating the opposite, the following is the
    supported and intended order throughout V8:
    
      exec -> perm(RW) -> patch -> flush -> perm(RX) -> exec
    
    This CL tries to establish said order throughout the codebase.
    
    R=ulan@chromium.org
    TEST=cctest/test-icache
    BUG=v8:8507,chromium:845877
    
    Change-Id: Ic945082e643aa2d142d222a7913a99816aff4644
    Reviewed-on: https://chromium-review.googlesource.com/c/1351025Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57869}
    64d373e5
test-icache.cc 6.65 KB