Giter Site home page Giter Site logo

Comments (7)

Jon-Becker avatar Jon-Becker commented on May 22, 2024

Will attempt to reproduce and resolve for 0.3.3. (I also have an M1 Mac)

Thank you!

from heimdall-rs.

davideaimar avatar davideaimar commented on May 22, 2024

I have the same problem with contract 0x4cce413f565f8a9e2a25d9d270a9a36061f4439d it overflows the stack executing 0x67dd74ca.
I ran the decompilation on the first 3570 contracts created and 703 of them timed out with a timeout of 2s and without resolving, so probably they all share the same problem.
I'm on MacOS x86-64.

from heimdall-rs.

Jon-Becker avatar Jon-Becker commented on May 22, 2024

@davideaimar I dont think thats related to this issue, this issue appears to be related to an unhandled panic in ethers-rs.

I'll open an issue for you and attempt to resolve it :)

from heimdall-rs.

Jon-Becker avatar Jon-Becker commented on May 22, 2024

gakonst/ethers-rs#2174

from heimdall-rs.

Jon-Becker avatar Jon-Becker commented on May 22, 2024

@ape-dev-cs partially resolved in #66. (It won't panic anymore)

Awaiting a patch on ethers-rs for a full fix, but I believe i've fixed all cases of this for now on my end.

I'll have this issue fully fixed in release 0.3.3 today or tomorrow.

from heimdall-rs.

ape-dev-cs avatar ape-dev-cs commented on May 22, 2024
 heimdall decompile 0xf8b721bff6bf7095a0e10791ce8f998baa254fd0 -vvv -d --include-sol --rpc-url <url> debug: found cached bytecode for '0xf8b721bff6bf7095a0e10791ce8f998baa254fd0' .
info: disassembled 21423 bytes successfully.
success: wrote disassembled bytecode to '/home/nodeuser/output/0xf8b721bff6bf7095a0e10791ce8f998baa254fd0/disassembled.asm' .
debug: disassembly completed in 52 ms.
debug: detected compiler solc 0.8.13.
info: resolved 6 possible functions from 19 detected selectors.
info: performing symbolic execution on '6080604052600436101561001e575b361561001c5761001c611a9d565b005b6000...6c634300080d0033' .
info: ⠙ analyzing '0x6dbf2fa0'                                                                                                                                                                                     fatal: thread 'main' encountered a fatal error: 'panicked at 'Integer overflow when casting to u64', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/primitive-types-0.12.1/src/lib.rs:38:1'!
fatal: Stack Trace:

   0:     0x55bb3ed33457 - backtrace::capture::Backtrace::new::h4a03f9cd77fe1519
   1:     0x55bb3ee186d4 - heimdall::main::{{closure}}::hfa6d75715006f28c
   2:     0x55bb3f0a0f5f - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h6e4950ba7c0fd82a
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2032:9
                           std::panicking::rust_panic_with_hook::h5cafdc4b3bfd5528
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:692:13
   3:     0x55bb3f0a0bd4 - std::panicking::begin_panic_handler::{{closure}}::hf31c60f40775892c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:577:13
   4:     0x55bb3f0a0b6e - std::sys_common::backtrace::__rust_end_short_backtrace::h28a5c7be595826cd
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:137:18
   5:     0x55bb3f0a0b41 - rust_begin_unwind
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
   6:     0x55bb3ececf22 - core::panicking::panic_fmt::h8fa27a0b37dd98b7
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
   7:     0x55bb3ed1f51a - heimdall::decompile::decompile::h9688a7b31010a517
   8:     0x55bb3ee155b8 - heimdall::main::h8a0eb94b5d900ee5
   9:     0x55bb3ee5eff3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h63bf843619c5d65b
  10:     0x55bb3ed0d679 - std::rt::lang_start::{{closure}}::h86b68573c40c6aa5
  11:     0x55bb3f0721f4 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hfa1c3687c9a20bb8
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs:606:13
                           std::panicking::try::do_call::h0497133ebe1341e5
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:483:40
                           std::panicking::try::h6c3de05c7ca5d07f
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:447:19
                           std::panic::catch_unwind::h969058ecb5334b30
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panic.rs:137:14
                           std::rt::lang_start_internal::{{closure}}::h0de6d98cafb42a58
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/rt.rs:148:48
                           std::panicking::try::do_call::h77301dcf43953993
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:483:40
                           std::panicking::try::h45b05523a2fe135a
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:447:19
                           std::panic::catch_unwind::hd95cea544b2b9bd2
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panic.rs:137:14
                           std::rt::lang_start_internal::hd16e6ff7bf05a444
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/rt.rs:148:20
  12:     0x55bb3ee11164 - main
  13:     0x7f4eb59d2d90 - <unknown>
  14:     0x7f4eb59d2e40 - __libc_start_main
  15:     0x55bb3ed0d365 - _start
  16:                0x0 - <unknown>

I'm still hitting a very similar issue with v0.3.3 with a different contract - output above. If we need to just wait for upstream issue to be fixed then no big deal.

Edit: I'm able to reproduce this on x86 and arm.

from heimdall-rs.

Jon-Becker avatar Jon-Becker commented on May 22, 2024

Panic resolved, however contract appears obfuscated somehow. Investigating.

Regardless, closing as panic is resolved. Will continue to improve.

#79

from heimdall-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.