Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #1092

Closed
Open
Opened Jun 04, 2024 by jie ma@alleysira2 of 19 tasks completed2/19 tasks

Stack underflow for opcode `CREATE2`

【问题分类】

  • bug
  • P2P网络相关(包含libp2p,liquid)
  • 链账户身份与权限相关(证书问题、public、多签投票问题)
  • 核心交易引擎相关(交易池、DAG)
  • 共识相关
  • 智能合约相关
  • 存储相关
  • SDK相关
  • 长安链CMC工具
  • 长安链管理台
  • 长安链浏览器
  • 长安链合约IDE
  • 长安链web签名插件
  • 跨链相关
  • 轻节点相关
  • 隐私计算相关
  • 密码学相关
  • 环境依赖
  • 其他补充:

【问题描述】(请对问题进行描述,方便定位问题)

According to EIP-1014 and evm opcode, the opcode CREATE2 (0xf0) should take 4 stack elements.

However, in https://git.chainmaker.org.cn/chainmaker/vm-evm/-/blob/master/evm-go/instructions/closure.go#L95 , the requireStackDepth is set to 2 instead of 4.

In https://git.chainmaker.org.cn/chainmaker/vm-evm/-/blob/master/evm-go/instructions/closure.go#L450 , the function commonCreate directly pops 3 elements from stack.

This operation will raise a stack underflow error because the number of elements in the stack is insufficient to fulfill the requirements of the operation.

Affected versions include vm-evm before commit a217d2bb5f1f368b1520256fcd805420ed13913b.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#1092

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。