[sparkplug] Fix short builtin calls

... and don't enable them for CFI builds.

Bug: v8:11527
Change-Id: I651473833c1e74d942bd75dc7574dbca45b34b64
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2786855
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73672}
This commit is contained in:
Igor Sheludko 2021-03-25 17:14:23 +01:00 committed by Commit Bot
parent 070159f3b9
commit ac2560c819
2 changed files with 5 additions and 3 deletions

View File

@ -379,8 +379,10 @@ if (v8_multi_arch_build &&
v8_enable_pointer_compression = !v8_enable_pointer_compression
v8_enable_pointer_compression_shared_cage = v8_enable_pointer_compression
}
if (v8_enable_short_builtin_calls && !v8_enable_pointer_compression) {
if (v8_enable_short_builtin_calls &&
(!v8_enable_pointer_compression || v8_control_flow_integrity)) {
# Disable short calls when pointer compression is not enabled.
# Or when CFI is enabled (until the CFI-related issues are fixed).
v8_enable_short_builtin_calls = false
}
if (v8_enable_shared_ro_heap == "") {

View File

@ -8803,8 +8803,8 @@ void Isolate::GetCodeRange(void** start, size_t* length_in_bytes) {
void Isolate::GetEmbeddedCodeRange(const void** start,
size_t* length_in_bytes) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
i::EmbeddedData d = i::EmbeddedData::FromBlob(isolate);
// Note, we should return the embedded code rande from the .text section here.
i::EmbeddedData d = i::EmbeddedData::FromBlob();
*start = reinterpret_cast<const void*>(d.code());
*length_in_bytes = d.code_size();
}