Skip to content

Commit 901fa79

Browse files
rmacnak-googlecommit-bot@chromium.org
authored andcommitted
[vm] Prevent bare instructions code from clobbering decisions about which instructions to include.
The ImageWriter is meant to include exactly those instructions passed to GetTextOffset, which isn't necessarily the current Instructions for every Code object. Bug: #41974 Change-Id: I77f09c70fd45f387f4802b30a86b155506529e29 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153043 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 1478b2b commit 901fa79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/vm/clustered_snapshot.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5333,7 +5333,7 @@ void Serializer::Serialize() {
53335333

53345334
intptr_t code_order_length = 0;
53355335
#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_IA32)
5336-
if (kind_ == Snapshot::kFullAOT) {
5336+
if ((kind_ == Snapshot::kFullAOT) && FLAG_use_bare_instructions) {
53375337
auto code_objects =
53385338
static_cast<CodeSerializationCluster*>(clusters_by_cid_[kCodeCid])
53395339
->discovered_objects();

0 commit comments

Comments
 (0)