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

Segfault when using try/catch in a test #14716

Open
volodymyrprokopyuk opened this issue Oct 21, 2024 · 0 comments
Open

Segfault when using try/catch in a test #14716

volodymyrprokopyuk opened this issue Oct 21, 2024 · 0 comments
Labels
crash An issue that could cause a crash linux An issue that occurs on Linux

Comments

@volodymyrprokopyuk
Copy link

How can we reproduce the crash?

Hi,

I think that the segfault is due to using the try/catch in a test. I use HardHat with ethers.js and the bun test runner to test Solidity contracts.

  test("Revert with insufficient funds", async () => {
    const [token, owner, acc1] = await loadFixture(contractAndAccounts)
    try {
      await token.connect(acc1).transfer(owner, 1n)
    } catch (e) {
      console.log(e)
    }
  })

The full example is at https://github.com/volodymyrprokopyuk/problem-solving/blob/master/solidity/tests/Token.test.js

Thank you for doing the exceptional work!

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.31 (e448c4c) on linux x86_64_baseline [TestCommand]

Segmentation fault at address 0x00000020

Features: jsc, no_avx2, transpiler_cache, tsconfig

@volodymyrprokopyuk volodymyrprokopyuk added the crash An issue that could cause a crash label Oct 21, 2024
@github-actions github-actions bot added the linux An issue that occurs on Linux label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash An issue that could cause a crash linux An issue that occurs on Linux
Projects
None yet
Development

No branches or pull requests

1 participant