ethereum / solc-js

Javascript bindings for the Solidity compiler
https://soliditylang.org
MIT License
1.46k stars 478 forks source link

RuntimeError: memory access out #745

Open GeorgeKvara opened 2 months ago

GeorgeKvara commented 2 months ago

After typing command nx compile hardhat I have few errors. It does not execute. Before I was using other laptop, which was Ubuntu and everything was working well but yesterday I bought mac m3 pro and I set up the environment but whenever I run that mentioned command I have those errors and does not execute. Can anyone tell me what is the issue or either hardhat is having a bug?

Error: Command failed: /Users/MacBook/.nvm/versions/node/v18.18.0/bin/node /Users/MacBook/Hinkal-Protocol/libs/hardhat/node_modules/hardhat/internal/solidity/compiler/solcjs-runner.js /Users/MacBook/Library/Caches/hardhat-nodejs/compilers-v2/wasm/soljson-v0.8.17+commit.8df45f5f.js
RuntimeError: memory access out of bounds
    at wasm://wasm/04f5a63e:wasm-function[882]:0x36ef6
    at wasm://wasm/04f5a63e:wasm-function[140]:0x25baf
    at invoke_ii (/Users/MacBook/Library/Caches/hardhat-nodejs/compilers-v2/wasm/soljson-v0.8.17+commit.8df45f5f.js:110:36997)
    at wasm://wasm/04f5a63e:wasm-function[41581]:0x1259761
    at ccall (/Users/MacBook/Library/Caches/hardhat-nodejs/compilers-v2/wasm/soljson-v0.8.17+commit.8df45f5f.js:110:28355)
    at /Users/MacBook/Library/Caches/hardhat-nodejs/compilers-v2/wasm/soljson-v0.8.17+commit.8df45f5f.js:110:28746
    at runWithCallbacks (/Users/MacBook/Hinkal-Protocol/libs/hardhat/node_modules/solc/wrapper.js:151:24)
    at compileStandard (/Users/MacBook/Hinkal-Protocol/libs/hardhat/node_modules/solc/wrapper.js:207:14)
    at Object.compileStandardWrapper [as compile] (/Users/MacBook/Hinkal-Protocol/libs/hardhat/node_modules/solc/wrapper.js:214:14)
    at main (/Users/MacBook/Hinkal-Protocol/libs/hardhat/node_modules/hardhat/internal/solidity/compiler/solcjs-runner.js:26:23)

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1098:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:303:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/Users/MacBook/.nvm/versions/node/v18.18.0/bin/node /Users/MacBook/Hinkal-Protocol/libs/hardhat/node_modules/hardhat/internal/solidity/compiler/solcjs-runner.js /Users/MacBook/Library/Caches/hardhat-nodejs/compilers-v2/wasm/soljson-v0.8.17+commit.8df45f5f.js'
}
mehtavishwa30 commented 2 months ago

Hey @GeorgeKvara!

Could you please provide more information such as the code snippet you're trying to compile so that the error could be reproduced? Additionally, you can try upgrading the compiler version and see if the error still persists.