paritytech / paritytech/revive
Large contract does not compile using the `Revive` WASM version on linux platform with `Bun`
Open
@smiasojed is already working on this.
Since Jan 10, 2025.
bug
enhancement
- Dominant language
- Rust
- Stars
- 102
- Forks
- 26
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 6
Description
Contract: https://github.com/paritytech/js-revive/blob/main/fixtures/token.sol?plain=1
Output:
~/github/js-revive main 8s
❯ bun src/main.ts
4 | if (typeof __filename != 'undefined') _scriptName ||= __filename;
5 | return (
6 | function(moduleArg = {}) {
7 | var moduleRtn;
8 |
9 | var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;var readyPromise=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject});var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){}var Module={stdinData:null,stdinDataPosition:0,stdoutData:[],stderrData:[],readFromStdout:function(){if(!this.stdoutData.length)return"";const decoder=new TextDecoder("utf-8");const data=decoder.decode(new Uint8Array(this.stdoutData));this.stdoutData=[];return data},readFromStderr:function(){if(!this.stderrData.length)return"";const decoder=new TextDecoder("utf-8");const data=decoder.decode(new Uint8Array(this.stderrData));this.stderrData=[];return data},writeToStdin:function(data){const encoder=new TextEncoder;this.stdinData=encoder.encode(data);this.stdinDataPosition=0},preRun:function(){func | ... truncated
RuntimeError: Out of bounds memory access (evaluating 'getWasmTableEntry(index)(a1, a2, a3, a4, a5)')
at <?>.wasm-function[126]
at <?>.wasm-function[268]
at <?>.wasm-function[10349]
at <?>.wasm-function[33862]
at <?>.wasm-function[6911]
at <?>.wasm-function[22493]
at invoke_viiiii (/home/pg/github/js-revive/src/resolc/resolc.js:9:83191)
at <?>.wasm-function[22451]
at invoke_viiii (/home/pg/github/js-revive/src/resolc/resolc.js:9:82330)
at <?>.wasm-function[28280]
Expected result: Contract is compiled without errors
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.