graphprotocol / graphprotocol/graph-node

out of bounds memory access wasm backtrace

Ouverte
#4,563 4 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

area/runtime bug Stale
Langage dominant
Rust
Étoiles
3.2k
Forks
1.1k
Merge moyen
4 j 1 h
PR mergées (30 j)
1

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par le wasm backtrace de handleTransferBatch au bloc #16899351, en suivant replaceURI, fetchERC1155Token et registerTransfer dans le code du subgraph OpenZeppelin référencé. Reproduisez l’accès mémoire hors limites avec le subgraph Amxx lié si possible ; c’est terminé lorsque le handler ne déclenche plus ce trap et que le comportement concerné est couvert par un test de régression.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
wasm
Domaine
blockchain
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.