This repository was archived by the owner on Apr 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1185,13 +1185,19 @@ fn exit(
1185
1185
unsafe {
1186
1186
context. restore ( snapshot) ;
1187
1187
1188
+ if context. stack . copying ( ) {
1189
+ assert ! ( context. stack. get_frame_pointer( ) != virtual_frame) ;
1190
+ context. stack . frame_pop ( ) ;
1191
+ }
1192
+
1188
1193
let stack = & mut context. stack ;
1189
1194
let mut preserve = match error {
1190
1195
Error :: ScryBlocked ( path) => path,
1191
1196
Error :: Deterministic ( _, t) | Error :: NonDeterministic ( _, t) | Error :: ScryCrashed ( t) => {
1192
1197
// Return $tang of traces
1193
1198
let h = * ( stack. local_noun_pointer ( 0 ) ) ;
1194
1199
// XX: Small chance of clobbering something important after OOM?
1200
+ // XX: what if we OOM while making a stack trace
1195
1201
T ( stack, & [ h, t] )
1196
1202
}
1197
1203
} ;
Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ impl NockStack {
137
137
} ;
138
138
}
139
139
140
+ pub fn copying ( & self ) -> bool {
141
+ self . pc
142
+ }
143
+
140
144
/** Current frame pointer of this NockStack */
141
145
pub fn get_frame_pointer ( & self ) -> * const u64 {
142
146
self . frame_pointer
You can’t perform that action at this time.
0 commit comments