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 @@ -250,30 +250,30 @@ Scheme_Object *scheme_native_stack_trace(void)
250
250
may have the next return address */
251
251
ctx .Rip = fp [- (3 + LOCAL_FRAME_SIZE + 1 )];
252
252
}
253
- name = NULL ;
253
+ name = find_symbol (( uintptr_t ) ctx . Rip ) ;
254
254
} else {
255
255
/* normal JIT function convention */
256
+ }
256
257
257
- cache_sp = (void * )fp ;
258
+ cache_sp = (void * )fp ;
258
259
259
- if (SCHEME_EOFP (name )) {
260
- /* JIT_LOCAL2 has the name to use */
261
- name = * (Scheme_Object * * )fp [JIT_LOCAL2 >> JIT_LOG_WORD_SIZE ];
262
- }
260
+ if (SCHEME_EOFP (name )) {
261
+ /* JIT_LOCAL2 has the name to use */
262
+ name = * (Scheme_Object * * )fp [JIT_LOCAL2 >> JIT_LOG_WORD_SIZE ];
263
+ }
263
264
264
- ctx .Rsp = ctx .Rbp + (2 * sizeof (void * ));
265
+ ctx .Rsp = ctx .Rbp + (2 * sizeof (void * ));
265
266
# ifdef NEED_LOCAL4
266
- ctx .R14 = fp [- JIT_LOCAL4_OFFSET ];
267
+ ctx .R14 = fp [- JIT_LOCAL4_OFFSET ];
267
268
# endif
268
- ctx .Rbp = fp [0 ];
269
- ctx .Rbx = fp [-1 ];
270
- ctx .Rsi = fp [-2 ];
271
- ctx .Rdi = fp [-3 ];
272
- ctx .Rip = fp [1 ];
273
-
274
- if (SCHEME_NULLP (name ))
275
- name = NULL ;
276
- }
269
+ ctx .Rbp = fp [0 ];
270
+ ctx .Rbx = fp [-1 ];
271
+ ctx .Rsi = fp [-2 ];
272
+ ctx .Rdi = fp [-3 ];
273
+ ctx .Rip = fp [1 ];
274
+
275
+ if (SCHEME_NULLP (name ))
276
+ name = NULL ;
277
277
} else {
278
278
unsuccess ++ ;
279
279
rf = RtlLookupFunctionEntry (ctx .Rip , & base , NULL );
@@ -302,6 +302,12 @@ Scheme_Object *scheme_native_stack_trace(void)
302
302
}
303
303
cache_sp = NULL ;
304
304
}
305
+
306
+ if (!(STK_COMP ((uintptr_t )ctx .Rsp , stack_end )
307
+ && STK_COMP (stack_start , (uintptr_t )ctx .Rsp ))) {
308
+ /* out of stack range */
309
+ break ;
310
+ }
305
311
}
306
312
307
313
if (last )
You can’t perform that action at this time.
0 commit comments