Modular verification of assembly code with stack-based control abstractions

被引:4
|
作者
Feng, Xinyu [1 ]
Shao, Zhong [1 ]
Vaynberg, Alexander [1 ]
Xiang, Sen [2 ]
Ni, Zhaozhong [1 ]
机构
[1] Yale Univ, Dept Comp Sci, New Haven, CT 06520 USA
[2] Univ Sci & Technol China, Dept Comp Sci & Technol, Anhua 230026, Peoples R China
关键词
assembly code verification; modularity; stack-based control abstractions; proof-carrying code;
D O I
10.1145/1133255.1134028
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Runtime stacks are critical components of any modern software they are used to implement powerful control structures such as function call/return, stack cutting and unwinding, coroutines, and thread context switch. Stack operations, however, are very hard to reason about: there are no known formal specifications for certifying C-style setjmp/longjmp, stack cutting and unwinding, or weak continuations ( in C--). In many proof-carrying code (PCC) systems, return code pointers and exception handlers are treated as general first-class functions ( as in continuation-passing style) even though both should have more limited scopes. In this paper we show that stack-based control abstractions follow a much simpler pattern than general first-class code pointers. We present a simple but flexible Hoare-style framework for modular verification of assembly code with all kinds of stackbased control abstractions, including function call/return, tail call, setjmp/longjmp, weak continuation, stack cutting, stack unwinding, multi-return function call, coroutines, and thread context switch. Instead of presenting a specific logic for each control structure, we develop all reasoning systems as instances of a generic framework. This allows program modules and their proofs developed in different PCC systems to be linked together. Our system is fully mechanized. We give the complete soundness proof and a full verification of several examples in the Coq proof assistant.
引用
收藏
页码:401 / 414
页数:14
相关论文
共 50 条
  • [41] RPLsh: An interactive shell for stack-based numerical computation
    Rauch, KP
    [J]. ASTRONOMICAL DATA ANALYSIS SOFTWARE AND SYSTEMS XI, 2002, 281 : 184 - 187
  • [42] A stack-based processor for resource efficient embedded systems
    Burutarchanai, A
    Nanthanavoot, P
    Aporntewan, C
    Chongstitvatana, P
    [J]. TENCON 2004 - 2004 IEEE REGION 10 CONFERENCE, VOLS A-D, PROCEEDINGS: ANALOG AND DIGITAL TECHNIQUES IN ELECTRICAL ENGINEERING, 2004, : D439 - D442
  • [43] Fast and flexible stack-based inverse tone mapping
    Zhang, Ning
    Ye, Yuyao
    Zhao, Yang
    Li, Xufeng
    Wang, Ronggang
    [J]. CAAI TRANSACTIONS ON INTELLIGENCE TECHNOLOGY, 2023, 8 (04) : 1444 - 1454
  • [44] Comments on "Stack-based Algorithms for Pattern Matching on DAGs"
    Zeng, Qiang
    Zhuge, Hai
    [J]. PROCEEDINGS OF THE VLDB ENDOWMENT, 2012, 5 (07): : 668 - 679
  • [45] Iterative stack-based detection for unknown ISI channels
    Nelson, Jill K.
    [J]. 2007 IEEE/SP 14TH WORKSHOP ON STATISTICAL SIGNAL PROCESSING, VOLS 1 AND 2, 2007, : 527 - 531
  • [46] Piezoelectric stack-based microactuator for hard disk drives
    Harper, DHF
    de Callafon, RA
    Skelton, RE
    Talke, FE
    [J]. JOURNAL OF INFORMATION STORAGE AND PROCESSING SYSTEMS, 1999, 1 (04): : 329 - 332
  • [47] Query Optimization by Result Caching in the Stack-Based Approach
    Cybula, Piotr
    Subieta, Kazimierz
    [J]. OBJECTS AND DATABASES, 2010, 6348 : 40 - +
  • [48] Stack-based grating for wideband polarization splitter in terahertz
    Lin, Zefan
    Wang, Bo
    Fu, Chen
    [J]. PHYSICA SCRIPTA, 2021, 96 (12)
  • [49] SaVioR: Thwarting Stack-Based Memory Safety Violations by Randomizing Stack Layout
    Lee, Seongman
    Kang, Hyeonwoo
    Jang, Jinsoo
    Kang, Brent Byunghoon
    [J]. IEEE TRANSACTIONS ON DEPENDABLE AND SECURE COMPUTING, 2022, 19 (04) : 2559 - 2575
  • [50] Performing stack-based genetic programming using the Java']Java Virtual Machine stack
    Steinhoff, RJ
    [J]. 7TH WORLD MULTICONFERENCE ON SYSTEMICS, CYBERNETICS AND INFORMATICS, VOL XIII, PROCEEDINGS: SYSTEMICS, CYBERNETICS AND INFORMATICS: TECHNOLOGIES AND APPLICATIONS, 2003, : 65 - 69