GithubHelp home page GithubHelp logo

Comments (3)

brmataptos avatar brmataptos commented on July 27, 2024 1

I added a simpler test case in third_party/move/move-compiler-v2/tests/unused-assignment/object_test.move
on branch https://github.com/aptos-labs/aptos-core/tree/brm-issue-13880. Enjoy.

from aptos-core.

brmataptos avatar brmataptos commented on July 27, 2024

You can reproduce the test output along with useful information for debugging with

MVC_LOG=trace MVC_BACKTRACE=1 RUST_BACKTRACE=1 UB=1 cargo test --profile ci -p move-compiler -p move-compiler-v2 -p move-compiler-v2-transactional-tests -p move-compiler-transactional-tests -p aptos-transactional-test-harness >& test.out25

That produces a 583MB file, so don't load it in an editor. Load it in less, and search (/) first for Unused assignment, showing something like:

ESC[0mESC[1mESC[38;5;11mwarningESC[0mESC[1m: Unused assignment to `to`. Consider removing or prefixing with an underscore: `_to`
Backtrace: Backtrace [
    { fn: "std::backtrace_rs::backtrace::libunwind::trace", file: "/rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/../../backtrace/src/backtrace/libunwind.rs", line: 105 },
    { fn: "std::backtrace_rs::backtrace::trace_unsynchronized", file: "/rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library/std/src/../../backtrace/src/backtrace/mod.rs", line: 66 },

Now, search backwards (?) for object\.move:621:

 17: move_to<object::TombStone>($t9, $t11)
     # at /Users/brm/code/aptos-core/aptos-move/framework/aptos-framework/sources/object.move:544:16+18
     # live vars: $t6
 18: $t12 := move($t6)
     # at /Users/brm/code/aptos-core/aptos-move/framework/aptos-framework/sources/object.move:621:41+12
     # live vars: $t12
 19: $t14 := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
     # at /Users/brm/code/aptos-core/aptos-move/framework/aptos-framework/sources/object.move:544:16+18
     # live vars: $t12, $t14
 20: $t13 := move($t14)
     # at /Users/brm/code/aptos-core/aptos-move/framework/aptos-framework/sources/object.move:545:27+37
     # live vars: $t12

Note that $t12 is assigned and is live at instruction 18. Why is it being flagged as unused?

from aptos-core.

brmataptos avatar brmataptos commented on July 27, 2024

I've managed to reproduce the test failure with a slightly smaller test output:

MVC_LOG=trace MVC_BACKTRACE=1 RUST_BACKTRACE=1 UB=1 cargo test --profile ci -p aptos-transactional-test-harness v2-tests/smoke_test >& test.out26

This time it's only 210MB. Still too big for an editor.

from aptos-core.

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.