You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that on IA32 app-jit snapshots (Snapshot::kFullJIT) are silently replaced with Snapshot::kFull.
We have checks to detect constants which might require legacy erasure. Those checks are supposed to run only for core snapshot with core libraries which is shared between weak and strong mode. However, those checks trigger for Snapshot::kFull which is also used on IA32 for application snapshots (which can contain arbitrary constants).
if (s->kind() == Snapshot::kFull && RequireLegacyErasureOfConstants(cls)) {
s->UnexpectedObject(cls, "Class with non mode agnostic constants");
}
I think we should find another way to distinguish core snapshots with core libraries. Maybe we should add a VM option and specify it when building core snapshot of core libraries. @rmacnak-google Do you know a better way?
The text was updated successfully, but these errors were encountered:
alexmarkov
added
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
NNBD
Issues related to NNBD Release
labels
Sep 30, 2020
I should note that app-jit does not imply kFullJIT nor vice versa. A core-jit snapshot will also have kFullJIT. If the erasure should only trigger for core snapshots rather than app snapshots, we should write another bit in the snapshot / carry a bit in the writer to distinguish the two.
I think the idea is to check that core snapshot with core libraries (platform) doesn't have constants which require legacy erasure, so the same snapshot can be safely used both in weak and strong modes. All snapshots with code including core-jit cannot be shared (reused) between weak and strong modes. We're also not reusing application snapshots and we cannot guarantee that there are no such constants, so we shouldn't do the check.
The following tests fail for this reason on IA32 in NNBD strong mode:
The problem is that on IA32
app-jit
snapshots (Snapshot::kFullJIT
) are silently replaced withSnapshot::kFull
.We have checks to detect constants which might require legacy erasure. Those checks are supposed to run only for core snapshot with core libraries which is shared between weak and strong mode. However, those checks trigger for
Snapshot::kFull
which is also used on IA32 for application snapshots (which can contain arbitrary constants).sdk/runtime/vm/clustered_snapshot.cc
Lines 248 to 250 in 2cf08d0
I think we should find another way to distinguish core snapshots with core libraries. Maybe we should add a VM option and specify it when building core snapshot of core libraries. @rmacnak-google Do you know a better way?
/cc @crelier
The text was updated successfully, but these errors were encountered: