`--newyork` returns 32 bytes from a 16-byte heap
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Start by tracing how the --newyork pipeline handles heap bounds for the Yul mstore and return operations; the issue gives a minimal reproducer and the relevant compiler options. Compare execution with --heap-size 16 and --heap-size 32 across both pipelines and optimization levels. Done means the 16-byte heap traps with ContractTrapped under both pipelines, while the 32-byte heap returns the same 32-byte word.
索引モデルが issue の本文から書いたものです。
説明
With --heap-size 16, mstore(off, 1); return(off, 32) at off = 0 traps with ContractTrapped under the baseline pipeline, but succeeds and returns a 32-byte word under --newyork at -O0, -O1, -O2, -O3, -Os, and -Oz. With --heap-size 32, both pipelines return the same 32-byte word.
object "C" {
code { stop() }
object "C_deployed" {
code {
let off := calldataload(0)
mstore(off, 1)
return(off, 32)
}
}
}
$ resolc --yul --bin --overwrite --heap-size 16 repro.yul -o base16
Compiler run successful. Artifact(s) can be found in directory "base16".
$ resolc --yul --newyork --optimization 0 --bin --overwrite --heap-size 16 repro.yul -o ny16
Compiler run successful. Artifact(s) can be found in directory "ny16".
$ RUST_LOG=runtime::revive=trace revive-runner -f base16/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Err(ExecError { error: Module(ModuleError { index: 3, error: [11, 0, 0, 0], message: Some("ContractTrapped") }), origin: Callee }), weight_consumed=Weight { ref_time: 4495653, proof_size: 362 }, weight_required=Weight { ref_time: 4495653, proof_size: 362 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
$ RUST_LOG=runtime::revive=trace revive-runner -f ny16/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Ok(ExecReturnValue { flags: (empty), data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }), weight_consumed=Weight { ref_time: 6612187, proof_size: 462 }, weight_required=Weight { ref_time: 6612187, proof_size: 462 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
$ resolc --yul --bin --overwrite --heap-size 32 repro.yul -o base32
Compiler run successful. Artifact(s) can be found in directory "base32".
$ resolc --yul --newyork --optimization 0 --bin --overwrite --heap-size 32 repro.yul -o ny32
Compiler run successful. Artifact(s) can be found in directory "ny32".
$ RUST_LOG=runtime::revive=trace revive-runner -f base32/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Ok(ExecReturnValue { flags: (empty), data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }), weight_consumed=Weight { ref_time: 14711211, proof_size: 765 }, weight_required=Weight { ref_time: 14711211, proof_size: 765 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
$ RUST_LOG=runtime::revive=trace revive-runner -f ny32/repro.yul:C.pvm 2>&1 | grep 'Bare call ends'
[TRACE runtime::revive] Bare call ends: result=Ok(ExecReturnValue { flags: (empty), data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] }), weight_consumed=Weight { ref_time: 6201286, proof_size: 455 }, weight_required=Weight { ref_time: 6201286, proof_size: 455 }, storage_deposit=Charge(0), gas_consumed=0, max_storage_deposit=Charge(0)
Expected behavior: the call traps with ContractTrapped under both pipelines when the configured 16-byte heap cannot hold a 32-byte store and return.
Git commit: 04e8decf76500000e1660919b2016ff776cf0c28
- 主要言語
- Rust
- スター
- 104
- フォーク
- 28
- 平均マージ
- 5日 14時間
- マージ済み PR(30日)
- 24
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
paritytech/revive のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
paritytech/revive#749 ·
メンテナーはふだん 3 日以内に返信
-
NY: ICEs on a variable assigned in a bare Yul block and read after it対応中かも @elle-j が 14 日前に担当しました。 オープン
paritytech/revive#733 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
resolc -O0 never terminates on a reachable empty-body infinite loop対応中かも @xermicus が 14 日前に担当しました。 オープン
paritytech/revive#732 · コメント 1 件 · リアクション 1 件 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
`--libraries` fails for a library found through `--include-path`再び着手できるかも @xermicus が 30 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
paritytech/revive#717 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
-
Standard JSON fails on `amsterdam` with `settings.experimental: true`再び着手できるかも @xermicus が 35 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
paritytech/revive#712 · 担当者 1 名 ·
メンテナーはふだん 3 日以内に返信
paritytech/revive の issue をすべて見る
似ている issue
-
Bash init calls `cygpath` unconditionally on Windows, which breaks non-Cygwin shells like `brush`対応中かも @iliqiliev が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ajeetdsouza/zoxide#1381 ·
メンテナーはふだん 5 日以内に返信
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
kornia/kornia-rs#1416 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
swc-project/swc-next-issues#1043 ·
-
compiler P2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
HerringtonDarkholme/hd-lang#2436 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信