edde575dcd
Adds a new SDK hash to kernels and the VM which is optionally checked to verify kernels are built for the same SDK as the VM. This helps catch incompatibilities that are currently causing subtle bugs and (not so subtle) crashes. The SDK hash is encoded in kernels as a new field in components. The hash is derived from the 10 byte git short hash. This new check can be disabled via: tools/gn.py ... --no-verify-sdk-hash This CL bumps the min. (and max.) supported kernel format version, making the VM backwards incompatible from this point back. Bug: https://github.com/dart-lang/sdk/issues/41802 Change-Id: I3cbb2d481239ee64dafdaa0e4aac36c80281931b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150343 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Jens Johansen <jensj@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
31 lines
785 B
C++
31 lines
785 B
C++
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef RUNTIME_VM_VERSION_H_
|
|
#define RUNTIME_VM_VERSION_H_
|
|
|
|
#include "vm/allocation.h"
|
|
|
|
namespace dart {
|
|
|
|
class Version : public AllStatic {
|
|
public:
|
|
static const char* String();
|
|
static const char* SnapshotString();
|
|
static const char* CommitString();
|
|
static int CurrentAbiVersion();
|
|
static int OldestSupportedAbiVersion();
|
|
static const char* SdkHash();
|
|
|
|
private:
|
|
static const char* str_;
|
|
static const char* snapshot_hash_;
|
|
static const char* commit_;
|
|
static const char* git_short_hash_;
|
|
};
|
|
|
|
} // namespace dart
|
|
|
|
#endif // RUNTIME_VM_VERSION_H_
|