Comments (3)
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.
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.
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)
- [Bug][Compiler-v2] FREEZEREF_EXISTS_MUTABLE_BORROW_ERROR
- [Bug][License] use of number-range under GPL v3.0 license HOT 2
- [Feature Request][move-compiler] Optionally print out the failing bytecode when verify fails
- [Bug] Move Book documentation has a redirect loop HOT 1
- [Bug] poor link text on doc website
- [Bug][move-compiler-v2] poor error message about unsupported address and wildcard access specifiers HOT 2
- [Bug][Compiler-v2] STLOC_UNSAFE_TO_DESTROY_ERROR
- [Bug][Compiler-v2] `aptos move test` missing support for receiver functions in Compiler v2
- [Bug][move-compiler-v2] COPYLOC_EXISTS_BORROW_ERROR for mutable ownership violation
- [Bug][move-compiler-v2] V2 silently compiles `ambiguous usage of variable` HOT 3
- [Bug] 2 mutable borrows in nested calls leads to `CALL_BORROWED_MUTABLE_REFERENCE_ERROR` on v2 only HOT 1
- [Feature Request]
- [Dev Portal] Bn254 algebra is not activated on testnet / mainnet HOT 4
- [Bug][Compiler-v2] Types not inferred properly when using receiver function style calls
- [Feature Request][move-comiler-v2] run `move_pr.sh -2` with `MVC_BLOCK_V1=true`
- [Bug] AptosCoin does not have a paired metadata HOT 1
- [compiler-v2] Cover bug for compiler release including Move 2 features
- [Bug][CLI] CLI v3.5.0 breaks parsing for functions named `match` HOT 1
- Release Builder Follow-ups
- [Feature Request][Move] Allow a tuple of expression on the lhs of an assignment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aptos-core.