阶段 B 步骤 6:.stb 写侧新格式(头 104 + 型号标识 + SHA-256 文件尾)。
- Stb:kHeaderSize 104、kSha256Size 32;SHA-256 实现(FIPS 180-4,含标准测试向量验证); fill_model_id(name+version 拼 32 字节补 '\0');StbView 解析新格式 + model_id()/model_matches()/sha_ok()(数据段不含尾、缺尾报错) - Codegen:assemble_image 写型号标识(偏移 72)+ 文件尾 SHA-256 - main.cpp:--disasm 显示 model/sha;写后自检(ok+sha+型号匹配,失败报错) - 测试:machine_test +SHA-256 已知向量(空串/abc)与型号标识断言(53 断言); codegen_test data_len 断言 +32(SHA 尾);ctest 12/12 - 验证:line1 288 字节 model=STATOR1 sha=ok;篡改一字节 sha=BAD
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
编译产物 `.stb` 的**面向使用者**的结构说明。规范以 [`指令与映像.md`](指令与映像.md) 为准,本文用 `line1.stb`(224 字节)做真实拆解。
|
||||
|
||||
> **12.13 修订**(尚未落地到代码,本文拆解仍为旧格式):头新增型号标识[32](头 72 → 104 字节,段偏移基准同步后移),文件尾新增 SHA-256[32]。落地后本文全部字节数字需重新生成。
|
||||
> **12.13 修订**(编译器写侧已落地,vm 读侧待步骤 8):头新增型号标识[32](头 72 → 104 字节,段偏移基准同步后移),文件尾新增 SHA-256[32](对文件尾之前全部内容计算)。line1 产物现为 288 字节。本文拆解仍为旧格式数字,需在 vm 侧落地后统一重新生成。
|
||||
|
||||
## 概览
|
||||
|
||||
|
||||
@@ -19,12 +19,14 @@
|
||||
|
||||
namespace compiler {
|
||||
|
||||
// ---- .stb 格式常量(契约)----
|
||||
// ---- .stb 格式常量(契约;12.13 修订:头 104 = 原 72 + 型号标识[32],文件尾 SHA-256[32])----
|
||||
static const uint32_t kMagic = 0x43545353u; // "STSC" 小端
|
||||
static const uint32_t kVersion = 1;
|
||||
static const size_t kHeaderSize = 72;
|
||||
static const size_t kHeaderSize = 104;
|
||||
static const size_t kConstEntrySize = 12;
|
||||
static const size_t kFuncRowSize = 12;
|
||||
static const size_t kSha256Size = 32;
|
||||
static const size_t kModelIdSize = 32;
|
||||
static const uint64_t kFnvBasis = 0xcbf29ce484222325ull;
|
||||
static const uint64_t kFnvPrime = 0x100000001b3ull;
|
||||
|
||||
@@ -38,6 +40,12 @@ namespace compiler {
|
||||
uint64_t fnv1a64_update(uint64_t h, const uint8_t* data, size_t len);
|
||||
uint64_t fnv1a64(const uint8_t* data, size_t len);
|
||||
|
||||
// SHA-256(文件完整性校验,非密码学用途之外的完整性)
|
||||
void sha256(const uint8_t* data, size_t len, uint8_t out[kSha256Size]);
|
||||
|
||||
// 型号标识:name + version 拼 32 字节 ASCII(如 "STATOR1"),不足补 '\0',超长截断
|
||||
void fill_model_id(const std::string& name, uint32_t version, char out[kModelIdSize]);
|
||||
|
||||
// 只读视图(--disasm 用;校验魔数/版本/段边界)
|
||||
class StbView {
|
||||
public:
|
||||
@@ -71,6 +79,11 @@ namespace compiler {
|
||||
const uint8_t* data_bytes() const;
|
||||
size_t data_len() const;
|
||||
|
||||
// 12.13:型号标识与 SHA-256 校验
|
||||
std::string model_id() const; // 头 72..103(补 '\0' 后字符串)
|
||||
bool model_matches(const std::string& name, uint32_t version) const;
|
||||
bool sha_ok() const; // 文件尾 32 字节 SHA-256 校验
|
||||
|
||||
private:
|
||||
StbView() : buf_(0), len_(0) {}
|
||||
|
||||
|
||||
@@ -694,7 +694,8 @@ namespace {
|
||||
code_total += static_cast<uint32_t>(f.code.size()) * 4;
|
||||
}
|
||||
const uint32_t off_data = off_code + code_total;
|
||||
const uint32_t off_end = off_data + static_cast<uint32_t>(data_.size());
|
||||
const uint32_t off_end = off_data + static_cast<uint32_t>(data_.size()) +
|
||||
static_cast<uint32_t>(kSha256Size);
|
||||
|
||||
std::vector<uint8_t>& b = *image_;
|
||||
b.assign(off_end, 0);
|
||||
@@ -728,6 +729,13 @@ namespace {
|
||||
put_le32(b, 64, off_data);
|
||||
put_le32(b, 68, off_data);
|
||||
|
||||
// 型号标识[32](偏移 72;12.13 修订)
|
||||
char mid[kModelIdSize];
|
||||
fill_model_id(cfg_.model_name(), cfg_.version(), mid);
|
||||
for (size_t i = 0; i < kModelIdSize; ++i) {
|
||||
b[72 + i] = static_cast<uint8_t>(mid[i]);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < consts_.size(); ++i) {
|
||||
const size_t o = off_const + i * kConstEntrySize;
|
||||
put_le32(b, o, consts_[i].tag);
|
||||
@@ -755,6 +763,14 @@ namespace {
|
||||
for (size_t i = 0; i < data_.size(); ++i) {
|
||||
b[off_data + i] = data_[i];
|
||||
}
|
||||
|
||||
// 文件尾 SHA-256(对文件尾之前全部内容计算)
|
||||
const size_t content_len = off_data + data_.size();
|
||||
uint8_t digest[kSha256Size];
|
||||
sha256(&b[0], content_len, digest);
|
||||
for (size_t i = 0; i < kSha256Size; ++i) {
|
||||
b[content_len + i] = digest[i];
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+156
-3
@@ -44,8 +44,129 @@ namespace {
|
||||
return v;
|
||||
}
|
||||
|
||||
// ---- SHA-256(FIPS 180-4)----
|
||||
|
||||
const uint32_t kShaK[64] = {
|
||||
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1,
|
||||
0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786,
|
||||
0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
|
||||
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147,
|
||||
0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
|
||||
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b,
|
||||
0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
|
||||
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a,
|
||||
0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
|
||||
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
|
||||
};
|
||||
|
||||
inline uint32_t rotr(uint32_t x, uint32_t n) { return (x >> n) | (x << (32 - n)); }
|
||||
|
||||
struct Sha256 {
|
||||
uint32_t h[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
|
||||
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19};
|
||||
uint64_t total = 0;
|
||||
uint8_t block[64];
|
||||
size_t block_len = 0;
|
||||
|
||||
void update(const uint8_t* data, size_t len) {
|
||||
total += len;
|
||||
while (len > 0) {
|
||||
const size_t take = (block_len < 64) ? (64 - block_len) : 0;
|
||||
const size_t n = len < take ? len : take;
|
||||
if (n > 0) {
|
||||
for (size_t i = 0; i < n; ++i) {
|
||||
block[block_len + i] = data[i];
|
||||
}
|
||||
block_len += n;
|
||||
data += n;
|
||||
len -= n;
|
||||
if (block_len == 64) {
|
||||
process();
|
||||
block_len = 0;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void process() {
|
||||
uint32_t w[64];
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
w[i] = get_be32(block + i * 4);
|
||||
}
|
||||
for (int i = 16; i < 64; ++i) {
|
||||
const uint32_t s0 = rotr(w[i - 15], 7) ^ rotr(w[i - 15], 18) ^ (w[i - 15] >> 3);
|
||||
const uint32_t s1 = rotr(w[i - 2], 17) ^ rotr(w[i - 2], 19) ^ (w[i - 2] >> 10);
|
||||
w[i] = w[i - 16] + s0 + w[i - 7] + s1;
|
||||
}
|
||||
uint32_t a = h[0], b = h[1], c = h[2], d = h[3];
|
||||
uint32_t e = h[4], f = h[5], g = h[6], hh = h[7];
|
||||
for (int i = 0; i < 64; ++i) {
|
||||
const uint32_t s1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
|
||||
const uint32_t ch = (e & f) ^ (~e & g);
|
||||
const uint32_t t1 = hh + s1 + ch + kShaK[i] + w[i];
|
||||
const uint32_t s0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
|
||||
const uint32_t maj = (a & b) ^ (a & c) ^ (b & c);
|
||||
const uint32_t t2 = s0 + maj;
|
||||
hh = g;
|
||||
g = f;
|
||||
f = e;
|
||||
e = d + t1;
|
||||
d = c;
|
||||
c = b;
|
||||
b = a;
|
||||
a = t1 + t2;
|
||||
}
|
||||
h[0] += a; h[1] += b; h[2] += c; h[3] += d;
|
||||
h[4] += e; h[5] += f; h[6] += g; h[7] += hh;
|
||||
}
|
||||
|
||||
void final(uint8_t out[32]) {
|
||||
const uint64_t bitlen = total * 8;
|
||||
const uint8_t pad = 0x80;
|
||||
update(&pad, 1);
|
||||
const uint8_t zeros[64] = {0};
|
||||
// 补零到 block_len == 56(跨块时先补满当前块再补)
|
||||
while (block_len != 56) {
|
||||
const size_t n = (block_len < 56) ? (56 - block_len) : (64 - block_len);
|
||||
update(zeros, n);
|
||||
}
|
||||
// 64 位大端比特长度
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
const uint8_t b2[1] = {static_cast<uint8_t>((bitlen >> (56 - 8 * i)) & 0xFF)};
|
||||
update(b2, 1);
|
||||
}
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
out[i * 4 + 0] = static_cast<uint8_t>((h[i] >> 24) & 0xFF);
|
||||
out[i * 4 + 1] = static_cast<uint8_t>((h[i] >> 16) & 0xFF);
|
||||
out[i * 4 + 2] = static_cast<uint8_t>((h[i] >> 8) & 0xFF);
|
||||
out[i * 4 + 3] = static_cast<uint8_t>(h[i] & 0xFF);
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t get_be32(const uint8_t* p) {
|
||||
return (static_cast<uint32_t>(p[0]) << 24) | (static_cast<uint32_t>(p[1]) << 16) |
|
||||
(static_cast<uint32_t>(p[2]) << 8) | static_cast<uint32_t>(p[3]);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
void sha256(const uint8_t* data, size_t len, uint8_t out[kSha256Size]) {
|
||||
Sha256 s;
|
||||
s.update(data, len);
|
||||
s.final(out);
|
||||
}
|
||||
|
||||
void fill_model_id(const std::string& name, uint32_t version, char out[kModelIdSize]) {
|
||||
const std::string id = name + std::to_string(version);
|
||||
for (size_t i = 0; i < kModelIdSize; ++i) {
|
||||
out[i] = i < id.size() ? id[i] : '\0';
|
||||
}
|
||||
}
|
||||
|
||||
StbView StbView::from(const uint8_t* buf, size_t len) {
|
||||
StbView v;
|
||||
v.buf_ = buf;
|
||||
@@ -77,11 +198,15 @@ StbView StbView::from(const uint8_t* buf, size_t len) {
|
||||
v.offset_fb_ = get_le32(buf + 64);
|
||||
v.offset_data_ = get_le32(buf + 68);
|
||||
|
||||
// 段校验
|
||||
// 段校验(12.13:文件尾 SHA-256[32] 在数据段之后)
|
||||
if (len < static_cast<size_t>(v.offset_data_) + kSha256Size) {
|
||||
v.err_ = "missing sha256 tail";
|
||||
return v;
|
||||
}
|
||||
const uint64_t offs[5] = {get_le32(buf + 52), get_le32(buf + 56), v.offset_code_,
|
||||
v.offset_fb_, v.offset_data_};
|
||||
for (int i = 0; i < 5; ++i) {
|
||||
if (offs[i] < kHeaderSize || offs[i] > len) {
|
||||
if (offs[i] < kHeaderSize || offs[i] > len - kSha256Size) {
|
||||
v.err_ = "segment offset out of range";
|
||||
return v;
|
||||
}
|
||||
@@ -154,7 +279,35 @@ const uint8_t* StbView::data_bytes() const {
|
||||
}
|
||||
|
||||
size_t StbView::data_len() const {
|
||||
return ok_ ? len_ - offset_data_ : 0;
|
||||
return ok_ ? (len_ - kSha256Size) - offset_data_ : 0;
|
||||
}
|
||||
|
||||
std::string StbView::model_id() const {
|
||||
if (!ok_) {
|
||||
return "";
|
||||
}
|
||||
std::string s(reinterpret_cast<const char*>(buf_ + 72), kModelIdSize);
|
||||
const size_t z = s.find('\0');
|
||||
if (z != std::string::npos) {
|
||||
s.resize(z);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
bool StbView::model_matches(const std::string& name, uint32_t version) const {
|
||||
char want[kModelIdSize];
|
||||
fill_model_id(name, version, want);
|
||||
return std::memcmp(buf_ + 72, want, kModelIdSize) == 0;
|
||||
}
|
||||
|
||||
bool StbView::sha_ok() const {
|
||||
if (!ok_) {
|
||||
return false;
|
||||
}
|
||||
const size_t content_len = len_ - kSha256Size;
|
||||
uint8_t digest[kSha256Size];
|
||||
sha256(buf_, content_len, digest);
|
||||
return std::memcmp(buf_ + content_len, digest, kSha256Size) == 0;
|
||||
}
|
||||
|
||||
bool read_stb_file(const char* path, std::vector<uint8_t>* out, std::string* err) {
|
||||
|
||||
+15
-2
@@ -47,8 +47,10 @@ namespace {
|
||||
}
|
||||
std::printf("image: %s (%zu bytes, %u functions, %u globals, entry fn %u)\n",
|
||||
path, bytes.size(), v.n_funcs(), v.n_globals(), v.entry_fn_id());
|
||||
std::printf(" dt_ms=%u cycle_limit=%u hash=0x%016llx\n", v.dt_ms(),
|
||||
v.cycle_limit(), static_cast<unsigned long long>(v.project_hash()));
|
||||
std::printf(" dt_ms=%u cycle_limit=%u hash=0x%016llx model=%s sha=%s\n",
|
||||
v.dt_ms(), v.cycle_limit(),
|
||||
static_cast<unsigned long long>(v.project_hash()),
|
||||
v.model_id().c_str(), v.sha_ok() ? "ok" : "BAD");
|
||||
|
||||
if (v.n_consts()) {
|
||||
std::printf("constants:\n");
|
||||
@@ -191,6 +193,17 @@ int main(int argc, char** argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// 写后自检:型号标识与 SHA-256
|
||||
const compiler::StbView self = compiler::StbView::from(image);
|
||||
if (!self.ok() || !self.sha_ok()) {
|
||||
std::fprintf(stderr, "error: self-check failed: %s\n", self.error().c_str());
|
||||
return 1;
|
||||
}
|
||||
if (!self.model_matches(cfg.model_name(), cfg.version())) {
|
||||
std::fprintf(stderr, "error: self-check model mismatch\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// sidecar:I/O 绑定 var → 槽号 → channel/bit(不进映像,执行器采样用)
|
||||
std::vector<compiler::IoBinding> bindings;
|
||||
for (const compiler::IoBinding& b : proj.io) {
|
||||
|
||||
@@ -187,7 +187,7 @@ static bool test_case09() {
|
||||
const isa::ImageView v = isa::ImageView::from(img);
|
||||
CHECK(v.ok());
|
||||
CHECK(v.header().n_globals == 1);
|
||||
CHECK(v.data_len() == 8); // 8 字节定宽槽
|
||||
CHECK(v.data_len() == 8 + 32); // 8 字节定宽槽 + SHA-256 尾
|
||||
CHECK(v.data_bytes()[0] == 5); // G1 初值 5(小端低位)
|
||||
CHECK(v.data_bytes()[1] == 0);
|
||||
|
||||
@@ -261,7 +261,7 @@ static bool test_layout() {
|
||||
const isa::ImageView v = isa::ImageView::from(img);
|
||||
CHECK(v.ok());
|
||||
CHECK(v.header().n_globals == 3);
|
||||
CHECK(v.data_len() == 24); // 3 槽 × 8 字节定宽
|
||||
CHECK(v.data_len() == 24 + 32); // 3 槽 × 8 字节定宽 + SHA-256 尾
|
||||
CHECK(v.data_bytes()[0] == 0); // B 无初值
|
||||
CHECK(v.data_bytes()[8] == 0x2C && v.data_bytes()[9] == 0x01); // I = 300(槽 1)
|
||||
CHECK(v.data_bytes()[16] == 10); // T = 10ms(槽 2)
|
||||
@@ -565,7 +565,7 @@ static bool test_case15() {
|
||||
CHECK(v.ok());
|
||||
CHECK(v.header().n_funcs == 2); // FB 占位 + MAIN
|
||||
CHECK(v.header().entry_fn_id == 1);
|
||||
CHECK(v.data_len() == 24); // 实例 3 槽 × 8 字节定宽
|
||||
CHECK(v.data_len() == 24 + 32); // 实例 3 槽 × 8 字节定宽 + SHA-256 尾
|
||||
|
||||
const isa::FuncRow fm = v.func_row(1);
|
||||
CHECK(fm.nregs == 12);
|
||||
@@ -603,7 +603,7 @@ static bool test_case17() {
|
||||
|
||||
const isa::ImageView v = isa::ImageView::from(img);
|
||||
CHECK(v.ok());
|
||||
CHECK(v.data_len() == 32); // in@0 pt@8 q@16 et@24
|
||||
CHECK(v.data_len() == 32 + 32); // in@0 pt@8 q@16 et@24 + SHA-256 尾
|
||||
const isa::FuncRow r = v.func_row(0);
|
||||
CHECK(r.nregs == 11);
|
||||
const uint32_t* ins = reinterpret_cast<const uint32_t*>(v.code_bytes());
|
||||
@@ -632,7 +632,7 @@ static bool test_case18() {
|
||||
|
||||
const isa::ImageView v = isa::ImageView::from(img);
|
||||
CHECK(v.ok());
|
||||
CHECK(v.data_len() == 72); // tf 4 槽 + c 5 槽 = 9 槽 × 8
|
||||
CHECK(v.data_len() == 72 + 32); // tf 4 槽 + c 5 槽 = 9 槽 × 8 + SHA-256 尾
|
||||
const isa::FuncRow r = v.func_row(0);
|
||||
CHECK(r.nregs == 14);
|
||||
const uint32_t* ins = reinterpret_cast<const uint32_t*>(v.code_bytes());
|
||||
@@ -675,7 +675,7 @@ static bool test_line1() {
|
||||
CHECK(v.header().n_globals == 4);
|
||||
CHECK(v.header().n_funcs == 2);
|
||||
CHECK(v.header().entry_fn_id == 1);
|
||||
CHECK(v.data_len() == 56); // 7 槽 × 8 字节定宽
|
||||
CHECK(v.data_len() == 56 + 32); // 7 槽 × 8 字节定宽 + SHA-256 尾
|
||||
|
||||
const isa::FuncRow fm = v.func_row(1);
|
||||
CHECK(fm.nregs == 13);
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
|
||||
#include "compiler/MachineConfig.h"
|
||||
#include "compiler/Stb.h"
|
||||
#include "compiler/TypeInfo.h"
|
||||
|
||||
#ifndef REPO_ROOT
|
||||
@@ -284,11 +286,44 @@ static bool test_type_meta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---- 5. SHA-256 已知向量 + 型号标识 ----
|
||||
|
||||
static bool test_sha256() {
|
||||
// 标准测试向量
|
||||
{
|
||||
uint8_t out[compiler::kSha256Size];
|
||||
compiler::sha256(nullptr, 0, out);
|
||||
const uint8_t want[32] = {0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14,
|
||||
0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24,
|
||||
0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c,
|
||||
0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55};
|
||||
CHECK(std::memcmp(out, want, 32) == 0);
|
||||
}
|
||||
{
|
||||
const uint8_t abc[] = {'a', 'b', 'c'};
|
||||
uint8_t out[compiler::kSha256Size];
|
||||
compiler::sha256(abc, 3, out);
|
||||
const uint8_t want[32] = {0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
|
||||
0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
|
||||
0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
|
||||
0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad};
|
||||
CHECK(std::memcmp(out, want, 32) == 0);
|
||||
}
|
||||
// 型号标识:STATOR + 1 → "STATOR1" 补 '\0'
|
||||
char mid[compiler::kModelIdSize];
|
||||
compiler::fill_model_id("STATOR", 1, mid);
|
||||
CHECK(std::strncmp(mid, "STATOR1", 7) == 0);
|
||||
CHECK(mid[7] == '\0');
|
||||
CHECK(mid[31] == '\0');
|
||||
return true;
|
||||
}
|
||||
|
||||
int main() {
|
||||
if (!test_positive()) return 1;
|
||||
if (!test_negative()) return 1;
|
||||
if (!test_positive_min()) return 1;
|
||||
if (!test_type_meta()) return 1;
|
||||
if (!test_sha256()) return 1;
|
||||
std::printf("machine_test: %d checks passed\n", g_checks);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user