Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

[verifier] add version-gating to type instantiation check #762

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

sblackshear
Copy link
Member

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions.

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions
@sblackshear sblackshear merged commit 5c26ce8 into move-language:main Dec 20, 2022
wrwg pushed a commit to wrwg/move-lang that referenced this pull request Dec 25, 2022
…age#762)

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions
wrwg added a commit that referenced this pull request Dec 25, 2022
* [verifier] check type instantiations behind a reference or inside vector generics (#758)

The verifier current doesn't check ability constraints on types that are behind a reference, or inside a vector (i.e., the `T` in `&T`, `&mut T`, or `vector<T>`). This sounds alarming, but is fortunately not possible to take advantage of because doing so always creates a bad struct instantiation that will be flagged b the ability checker.

Fix the bug in version 7--left it in version 6 and below because it is (to the best of our understanding) harmless and the fix is a breaking change in the verifier--it will reject some function declarations that were previously accepted.

* [tools] print imports, fully qualified function names in disassembler (#757)

Previously, the disassembler did not print dependency information or use fully qualified function names. That makes it difficult to see what code a module is using/which functions it's calling, and (in the case of name conflicts) can create ambiguity.

- Add a module alias map to the disassembler state that disambiguates between modules with the same name
- Use the alias map to print dep info, using source langauge syntax. Resolve name conflicts using `as` (again, like the source langguage).
- Also print fully qualified function names. Internal function calls have no module name prefix or `::`, as in the source language.

See added test for details on what the printed output looks like + how conflicts are resolved.

* [misc] add Move logo images (#709)

* [verifier] add version-gating to type instantiation check (#762)

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions

* [compiler] Fix instantiation of field types with type parameters (#764)

- Fixed a bug where ability constraints where not properly checked for fields containing the structs type parameter

Co-authored-by: Sam Blackshear <[email protected]>
Co-authored-by: Todd Nowacki <[email protected]>
nkysg pushed a commit to starcoinorg/move that referenced this pull request Feb 28, 2023
…age#762)

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions
nkysg pushed a commit to starcoinorg/move that referenced this pull request Feb 28, 2023
…age#762)

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions
nkysg pushed a commit to starcoinorg/move that referenced this pull request Mar 6, 2023
…age#762)

78a9e2b was known to be a breaking change, but it was unclear whether it would break real code. Turns out that it does, so preserve the old behavior in older bytecode versions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants