Giter VIP home page Giter VIP logo

Comments (2)

rahxephon89 avatar rahxephon89 commented on August 28, 2024

Here is generated bytecode:

entry public init() /* def_idx: 0 */ {
L0:	loc0: vector<String>
L1:	loc1: vector<vector<u8>>
L2:	loc2: vector<u8>
L3:	loc3: vector<u8>
L4:	loc4: vector<String>
L5:	loc5: vector<String>
L6:	loc6: vector<vector<u8>>
L7:	loc7: vector<u64>
L8:	loc8: u64
L9:	loc9: u64
L10:	loc10: vector<vector<u8>>
L11:	loc11: vector<vector<u8>>
B0:
	0: VecPack(1, 0)
	1: StLoc[0](loc0: vector<String>)
	2: LdConst[0](Vector(Vector(U8)): [0])
	3: StLoc[1](loc1: vector<vector<u8>>)
	4: MutBorrowLoc[1](loc1: vector<vector<u8>>)
	5: Call vector::reverse<vector<u8>>(&mut vector<vector<u8>>)
B1:
	6: ImmBorrowLoc[1](loc1: vector<vector<u8>>)
	7: Call vector::is_empty<vector<u8>>(&vector<vector<u8>>): bool
	8: Not
	9: BrFalse(20)
B2:
	10: MutBorrowLoc[1](loc1: vector<vector<u8>>)
	11: VecPopBack(2)
	12: StLoc[2](loc2: vector<u8>)
	13: MutBorrowLoc[0](loc0: vector<String>)
	14: MoveLoc[2](loc2: vector<u8>)
	15: StLoc[3](loc3: vector<u8>)
	16: MoveLoc[3](loc3: vector<u8>)
	17: Call string::utf8(vector<u8>): String
	18: VecPushBack(1)
	19: Branch(21)
B3:
	20: Branch(22)
B4:
	21: Branch(6)
B5:
	22: MoveLoc[0](loc0: vector<String>)
	23: StLoc[4](loc4: vector<String>)
	24: MoveLoc[4](loc4: vector<String>)
	25: StLoc[5](loc5: vector<String>)
	26: VecPack(2, 0)
	27: StLoc[6](loc6: vector<vector<u8>>)
	28: LdConst[0](Vector(Vector(U8)): [0])
	29: StLoc[7](loc7: vector<u64>)
	30: MutBorrowLoc[7](loc7: vector<u64>)
	31: Call vector::reverse<u64>(&mut vector<u64>)
B6:
	32: ImmBorrowLoc[7](loc7: vector<u64>)
	33: Call vector::is_empty<u64>(&vector<u64>): bool
	34: Not
	35: BrFalse(46)
B7:
	36: MutBorrowLoc[7](loc7: vector<u64>)
	37: VecPopBack(6)
	38: StLoc[8](loc8: u64)
	39: MutBorrowLoc[6](loc6: vector<vector<u8>>)
	40: MoveLoc[8](loc8: u64)
	41: StLoc[9](loc9: u64)
	42: ImmBorrowLoc[9](loc9: u64)
	43: Call bcs::to_bytes<u64>(&u64): vector<u8>
	44: VecPushBack(2)
	45: Branch(47)
B8:
	46: Branch(48)
B9:
	47: Branch(32)
B10:
	48: MoveLoc[6](loc6: vector<vector<u8>>)
	49: StLoc[10](loc10: vector<vector<u8>>)
	50: MoveLoc[10](loc10: vector<vector<u8>>)
	51: StLoc[11](loc11: vector<vector<u8>>)
	52: Ret
}
}

The error happens at instr 28 and 29 where the type of vector is not correct.

from aptos-core.

rahxephon89 avatar rahxephon89 commented on August 28, 2024

The issue may be caused by two constants with different types but the same value:

const KEYS: vector<vector<u8>> = vector[];
const VALUES: vector<u64> = vector[];

cc @brianrmurphy

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.