File tree 1 file changed +23
-17
lines changed
1 file changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -244,30 +244,30 @@ Scheme_Object *scheme_native_stack_trace(void)
244
244
may have the next return address */
245
245
ctx .Rip = fp [- (3 + LOCAL_FRAME_SIZE + 1 )];
246
246
}
247
- name = NULL ;
247
+ name = find_symbol (( uintptr_t ) ctx . Rip ) ;
248
248
} else {
249
249
/* normal JIT function convention */
250
+ }
250
251
251
- cache_sp = (void * )fp ;
252
+ cache_sp = (void * )fp ;
252
253
253
- if (SCHEME_EOFP (name )) {
254
- /* JIT_LOCAL2 has the name to use */
255
- name = * (Scheme_Object * * )fp [JIT_LOCAL2 >> JIT_LOG_WORD_SIZE ];
256
- }
254
+ if (SCHEME_EOFP (name )) {
255
+ /* JIT_LOCAL2 has the name to use */
256
+ name = * (Scheme_Object * * )fp [JIT_LOCAL2 >> JIT_LOG_WORD_SIZE ];
257
+ }
257
258
258
- ctx .Rsp = ctx .Rbp + (2 * sizeof (void * ));
259
+ ctx .Rsp = ctx .Rbp + (2 * sizeof (void * ));
259
260
# ifdef NEED_LOCAL4
260
- ctx .R14 = fp [- JIT_LOCAL4_OFFSET ];
261
+ ctx .R14 = fp [- JIT_LOCAL4_OFFSET ];
261
262
# endif
262
- ctx .Rbp = fp [0 ];
263
- ctx .Rbx = fp [-1 ];
264
- ctx .Rsi = fp [-2 ];
265
- ctx .Rdi = fp [-3 ];
266
- ctx .Rip = fp [1 ];
267
-
268
- if (SCHEME_NULLP (name ))
269
- name = NULL ;
270
- }
263
+ ctx .Rbp = fp [0 ];
264
+ ctx .Rbx = fp [-1 ];
265
+ ctx .Rsi = fp [-2 ];
266
+ ctx .Rdi = fp [-3 ];
267
+ ctx .Rip = fp [1 ];
268
+
269
+ if (SCHEME_NULLP (name ))
270
+ name = NULL ;
271
271
} else {
272
272
unsuccess ++ ;
273
273
rf = RtlLookupFunctionEntry (ctx .Rip , & base , NULL );
@@ -296,6 +296,12 @@ Scheme_Object *scheme_native_stack_trace(void)
296
296
}
297
297
cache_sp = NULL ;
298
298
}
299
+
300
+ if (!(STK_COMP ((uintptr_t )ctx .Rsp , stack_end )
301
+ && STK_COMP (stack_start , (uintptr_t )ctx .Rsp ))) {
302
+ /* out of stack range */
303
+ break ;
304
+ }
299
305
}
300
306
301
307
if (last )
You can’t perform that action at this time.
0 commit comments