• jgruber's avatar
    [snapshot] Flush icache and allocate with code alignment · f8947063
    jgruber authored
    This fixes two issues related to Code object allocation: Code objects
    need to be aligned to kCodeAlignment (= 32), and the instruction cache
    needs to be flushed after deserialization.
    
    Both bugs combined manifested as a crash at a basically arbitrary point
    in the code after the Runtime::kDeserializeLazy call:
    
    0x286bc8dc:  blx     r12     // Call to Runtime::kDeserializeLazy,
                                 // generated through
                                 // GenerateTailCallToReturnedCode.
    0x286bc8e0:  mov     r2, r0  // This seemingly innocent register move
                                 // crashes hard.
    
    Bug: v8:6624,v8:6796
    Change-Id: I88c7eaf57ac851745fb7e800c92b0f5978b33466
    Reviewed-on: https://chromium-review.googlesource.com/660119Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47947}
    f8947063
startup-deserializer.cc 3.85 KB