Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large contract does not compile using the Revive WASM version on linux platform with Bun #149

Open
smiasojed opened this issue Jan 10, 2025 · 0 comments
Assignees

Comments

@smiasojed
Copy link
Collaborator

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

@smiasojed smiasojed self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant