0xMiden / 0xMiden/compiler

Tests arith ops overflowing behaves as expected

未关闭
#1,299 1 条评论 0 个 reaction 已指派 1 人 已被 @mooori 认领 在 GitHub 查看
主要语言
Rust
星标
115
派生
84
平均合并
1 天 8 小时
30 天内合并 PR
15

描述

Ranges are chosen to avoid overflow as `test_int_op!` and related macros only handle the happy path. It seems like we don't yet have tests which verify plain (i.e. not checked/overflowing) arith ops behave as expected in the VM when the result overflows?

_Originally posted by @mooori in https://github.com/0xMiden/compiler/pull/1287#pullrequestreview-4827928194_

贡献指南

打开贡献指南

调研方向

查看代码库中现有的测试宏(如 `test_int_op!`)以了解当前的测试模式。找到虚拟机的算术运算实现,查看溢出是如何处理的。编写触发简单算术运算(add、sub、mul)溢出的新测试,并验证虚拟机的行为是否符合预期。

由索引模型根据 Issue 内容生成。

评估

技术栈
rust
领域
testing
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。