File tree Expand file tree Collapse file tree
crates/movy-replay/src/tracer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,8 +117,16 @@ impl TraceState {
117117 self . loaded_state . insert ( * id, snapshot. clone ( ) ) ;
118118 }
119119 } ,
120- // External events are treated opaqeuly
121- TraceEvent :: External ( _) => ( ) ,
120+ // External events are treated opaquely unless they define a trace boundary.
121+ TraceEvent :: External ( external) => {
122+ if external. as_str ( ) . is_some_and ( |s| s == "MoveCallStart" ) {
123+ // New trace boundary. Reset reconstructed runtime state to avoid
124+ // leaking values across calls/txns.
125+ self . loaded_state . clear ( ) ;
126+ self . operand_stack . clear ( ) ;
127+ self . call_stack . clear ( ) ;
128+ }
129+ }
122130 // Instructions
123131 TraceEvent :: Instruction { .. } | TraceEvent :: BeforeInstruction { .. } => ( ) ,
124132 }
@@ -150,4 +158,3 @@ impl Tracer for TraceState {
150158 // no emit for
151159 }
152160}
153-
You can’t perform that action at this time.
0 commit comments