graphprotocol / graphprotocol/graph-node

out of bounds memory access wasm backtrace

オープン
#4,563 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

area/runtime bug Stale
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

Bug report

Deployed a local subgraph using graph-node v0.30.0 and got into this issue :
#4317 same issue but this is on mainnet
Did you look into this @tilacog
subgraph git
https://github.com/Amxx/subgraphs/tree/master/subgraphs/common

Relevant log output
wasm trap: out of bounds memory access	
wasm backtrace:	    
0: 0x1d42 - <unknown>!~lib/util/memory/memcpy	  
1: 0x1e8b - <unknown>!~lib/memory/memory.copy	   
2: 0x36e2 - <unknown>!~lib/string/String#replaceAll	    
3: 0x387e - <unknown>!../node_modules/@openzeppelin/subgraphs/src/fetch/erc1155/replaceURI	    
4: 0x3c3e - <unknown>!../node_modules/@openzeppelin/subgraphs/src/fetch/erc1155/fetchERC1155Token	   
5: 0x3db3 - <unknown>!../node_modules/@openzeppelin/subgraphs/src/datasources/erc1155/registerTransfer	    
6: 0x4843 - <unknown>!../node_modules/@openzeppelin/subgraphs/src/datasources/erc1155/handleTransferBatch
in handler handleTransferBatch at block #16899351 (b1e020fd883a5a65f091fe52c275fcdcde1fabbb1a6b48a33bcd941e2e8ade19)
IPFS hash

No response

Subgraph name or link to explorer

Amxx subgraphs ERC-721 ERC-1155

Some information to help us out
  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
OS information

Linux

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ブロック #16899351 における handleTransferBatch の wasm backtrace から始め、参照されている OpenZeppelin subgraph のコードで replaceURI、fetchERC1155Token、registerTransfer を追跡してください。可能であれば、リンク先の Amxx subgraph を使って範囲外メモリアクセスを再現してください。handler がこの trap を発生させなくなり、関連する動作が回帰テストでカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
wasm
領域
blockchain
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。