mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 02:09:33 +01:00
* fixed checking the address of installed signal handlers on aix and
linux/ppc64 (have to look past the function descriptors) git-svn-id: trunk@20820 -
This commit is contained in:
parent
6f02f47e59
commit
9a1cd0ec4c
@ -106,7 +106,14 @@ function InternalInquireSignal(RtlSigNum: Integer; out act: SigActionRec; fromin
|
||||
if not frominit then
|
||||
begin
|
||||
{ check whether the installed signal handler is still ours }
|
||||
{$if not defined(aix) and (not defined(linux) or not defined(cpupowerpc64))}
|
||||
if (pointer(act.sa_handler)=pointer(@defaultsighandler)) then
|
||||
{$else}
|
||||
{ on aix and linux/ppc64, procedure addresses are actually
|
||||
descriptors -> check whether the code addresses inside the
|
||||
descriptors match, rather than the descriptors themselves }
|
||||
if (ppointer(act.sa_handler)^=ppointer(@defaultsighandler)^) then
|
||||
{$endif}
|
||||
result:=ssHooked
|
||||
else
|
||||
result:=ssOverridden;
|
||||
@ -121,7 +128,11 @@ function InternalInquireSignal(RtlSigNum: Integer; out act: SigActionRec; fromin
|
||||
{ program -> signals have been hooked by system init code }
|
||||
if (byte(RtlSigNum) in [RTL_SIGFPE,RTL_SIGSEGV,RTL_SIGILL,RTL_SIGBUS]) then
|
||||
begin
|
||||
{$if not defined(aix) and (not defined(linux) or not defined(cpupowerpc64))}
|
||||
if (pointer(act.sa_handler)=pointer(@defaultsighandler)) then
|
||||
{$else}
|
||||
if (ppointer(act.sa_handler)^=ppointer(@defaultsighandler)^) then
|
||||
{$endif}
|
||||
result:=ssHooked
|
||||
else
|
||||
result:=ssOverridden;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user