CFG_MS_Except_Block

class CFG_MS_Except_Block (concrete, logical)

MS extension: __try{..}__except(filter-expression){..}. This CFG block is used at the end of the filter expression to transfer control into the handler block. The behavior depends on what the filter-expression evaluated to:

  • EXCEPTION_CONTINUE_EXECUTION (-1): execution resumes at the faulting instruction. This is not explicitly represented in the control flow graph.

  • EXCEPTION_CONTINUE_SEARCH (0): follow Exceptional_Next edge.

  • EXCEPTION_EXECUTE_HANDLER (1): follow Handler edge.

Note that in our LIR modeling, __finally blocks already run during unwinding before the filter expression is evaluated. The correct MSVC semantics would be to use two-phase unwinding: first evaluate all filter-expressions to find the matching handler without running any destructors or finally blocks. Then (only after EXCEPTION_EXECUTE_HANDLER) properly unwind the stack calling destructors and running finally blocks.

Direct parents:
Ancestor classes and implemented interfaces:

CFG_Block, CFG_Catch_Block, CFG_Standard_Block, Execution_Node, Logical_IR_Root

Field

Kind

Type

Description

Exceptional_Next

semantic

class CFG_Block

if search for matching handler should continue (EXCEPTION_CONTINUE_SEARCH)

Handler (from CFG_Catch_Block)

semantic

class CFG_Block

Code (from CFG_Standard_Block)

syntactic

list of class Instruction

Helpers (from CFG_Standard_Block)

syntactic

list of class Helper_Variable

Start_Role (from CFG_Standard_Block)

attribute

enum Cfg_Block_Start_Role

Provides an explanation why a new block was started. The Start_Physical edge provides details specific to the role. More details are documented on the individual role enumerators.

Start_Physical (from CFG_Standard_Block)

semantic to physical

class Physical_IR_Root

Physical edge related to the block start; see Start_Role for the interpretation of this edge.

Parent (from Logical_IR_Root)

semantic

class Logical_IR_Root

Physical (from Logical_IR_Root)

semantic to physical

class Physical_IR_Root