Commit 45fa14f0 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

Revert "Flush ICache on startup deserialization after marking memory executable"

This reverts commit 05bcb12e.

Reason for revert: Causes isolate startup regressions (https://crbug.com/845508)

Original change's description:
> Flush ICache on startup deserialization after marking memory executable
>
> Tentative fix for Android invoke crashers with write protection code
> enabled.
>
> Bug: chromium:842862
> Change-Id: If238b25b239b50c597f3745aa683f564a717434f
> Reviewed-on: https://chromium-review.googlesource.com/1061513
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53209}

TBR=mstarzinger@chromium.org,cbruni@chromium.org,jgruber@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:842862, chromium:845508, chromium:845877
Change-Id: Iff002e1ac75aca48c696053dddf1b413f372629e
Reviewed-on: https://chromium-review.googlesource.com/1068048
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53305}
parent a694a56d
......@@ -3085,10 +3085,6 @@ bool Isolate::Init(StartupDeserializer* des) {
heap_.NotifyDeserializationComplete();
}
// Flush the instruction cache for the entire code-space. Must happen after
// builtins deserialization and setting the memory executable again.
if (!create_heap_objects) des->FlushICacheForNewIsolate();
delete setup_delegate_;
setup_delegate_ = nullptr;
......
......@@ -45,6 +45,10 @@ void StartupDeserializer::DeserializeInto(Isolate* isolate) {
// Deserialize eager builtins from the builtin snapshot. Note that deferred
// objects must have been deserialized prior to this.
builtin_deserializer.DeserializeEagerBuiltinsAndHandlers();
// Flush the instruction cache for the entire code-space. Must happen after
// builtins deserialization.
FlushICacheForNewIsolate();
}
isolate->heap()->set_native_contexts_list(isolate->heap()->undefined_value());
......
......@@ -21,9 +21,8 @@ class StartupDeserializer final : public Deserializer<> {
// Deserialize the snapshot into an empty heap.
void DeserializeInto(Isolate* isolate);
void FlushICacheForNewIsolate();
private:
void FlushICacheForNewIsolate();
void PrintDisassembledCodeObjects();
// Rehash after deserializing an isolate.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment