mirror of
https://github.com/solemnwarning/ipxwrapper
synced 2024-12-30 16:45:37 +01:00
Skip profiling when disabled in stubs with unknown arguments.
The profiling code normally harmlessly no-ops in this case, but it can crash when the profiling code hasn't bee initialised.
This commit is contained in:
parent
f503415a30
commit
b4e4480d75
@ -271,10 +271,17 @@ END
|
|||||||
|
|
||||||
$func->{name}_go:
|
$func->{name}_go:
|
||||||
|
|
||||||
|
; Bypass the profiling code and jump straight into the taget
|
||||||
|
; function when not profiling.
|
||||||
|
cmp byte [_stubs_enable_profile], 0
|
||||||
|
je $func->{name}_skip
|
||||||
|
|
||||||
; Record that we were called
|
; Record that we were called
|
||||||
push dword $func->{name}_fstats
|
push dword $func->{name}_fstats
|
||||||
call _fprof_record_untimed
|
call _fprof_record_untimed
|
||||||
|
|
||||||
|
$func->{name}_skip:
|
||||||
|
|
||||||
; Jump into target function. We have left the stack as we found it
|
; Jump into target function. We have left the stack as we found it
|
||||||
; so it can take over our frame.
|
; so it can take over our frame.
|
||||||
jmp [$func->{name}_addr]
|
jmp [$func->{name}_addr]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user