+ runerror 214: bus error/data misaligment

git-svn-id: trunk@1263 -
This commit is contained in:
florian 2005-10-03 08:25:20 +00:00
parent d9c071da6d
commit d4bb99a5fb
8 changed files with 27 additions and 15 deletions

View File

@ -29,9 +29,10 @@ begin
res := 207;
end;
SIGILL,
SIGBUS,
SIGSEGV :
res:=216;
SIGBUS:
res:=214;
end;
reenable_signal(sig);
{ give runtime error at the position where the signal was raised }

View File

@ -40,8 +40,9 @@ begin
}
res := 207;
end;
SIGBUS :
res:=214;
SIGILL,
SIGBUS,
SIGSEGV :
res:=216;
end;

View File

@ -40,8 +40,9 @@ begin
}
res := 207;
end;
SIGBUS :
res:=214;
SIGILL,
SIGBUS,
SIGSEGV :
res:=216;
end;

View File

@ -57,8 +57,12 @@ begin
res:=207;
end;
end;
SIGBUS :
begin
addr := siginfo^._sifields._sigfault._addr;
res:=214;
end;
SIGILL,
SIGBUS,
SIGSEGV :
begin
addr := siginfo^._sifields._sigfault._addr;

View File

@ -28,6 +28,7 @@ resourcestring
SArgumentMissing = 'Missing argument in format "%s"';
SAssertError = '%s (%s, line %d)';
SAssertionFailed = 'Assertion failed';
SBusError = 'Bus error or misaligned data access';
SCannotCreateEmptyDir = 'Cannot create empty directory';
SControlC = 'Control-C hit';
SDiskFull = 'Disk Full';
@ -182,6 +183,7 @@ begin
206 : Result:=SUnderFlow;
207 : Result:=SInvalidOp;
211 : Result:=SAbstractError;
214 : Result:=SBusError;
215 : Result:=SIntOverFlow;
216 : Result:=SAccessViolation;
217 : Result:=SPrivilege;

View File

@ -121,6 +121,7 @@ type
EVariantError = Class(Exception);
EAccessViolation = Class(EExternal);
EBusError = Class(EAccessViolation);
EPrivilege = class(EExternal);
EStackOverflow = class(EExternal);
EControlC = class(EExternal);
@ -170,13 +171,13 @@ Type
Var
OnCreateGUID : TCreateGUIDFunc = Nil;
Function CreateGUID(out GUID : TGUID) : Integer;
type
TTerminateProc = Function: Boolean;
procedure AddTerminateProc(TermProc: TTerminateProc);
function CallTerminateProcs: Boolean;

View File

@ -56,10 +56,10 @@
{$ifndef OS_FILESETDATEBYNAME}
Function FileSetDate (Const FileName : String;Age : Longint) : Longint;
Var
fd : longint;
begin
fd:=FileOpen(FileName,fmOpenRead);
If (Fd>=0) then
@ -69,8 +69,8 @@
FileClose(fd);
end
else
Result:=Fd;
end;
Result:=Fd;
end;
{$endif}
{ Read String Handling functions implementation }
@ -93,7 +93,7 @@
{ threading stuff }
{$i sysuthrd.inc}
{ CPU Specific code }
{$i sysutilp.inc}
@ -257,6 +257,7 @@ begin
206 : E:=EOverflow.Create(SUnderflow);
207 : E:=EInvalidOp.Create(SInvalidOp);
211 : E:=EAbstractError.Create(SAbstractError);
214 : E:=EBusError.Create(SBusError);
215 : E:=EIntOverflow.Create(SIntOverflow);
216 : E:=EAccessViolation.Create(SAccessViolation);
217 : E:=EPrivilege.Create(SPrivilege);
@ -533,9 +534,9 @@ begin
{$IFDEF HASCREATEGUID}
Result:=SysCreateGUID(GUID);
{$ELSE}
GetRandomBytes(GUID,SizeOf(Guid));
GetRandomBytes(GUID,SizeOf(Guid));
Result:=0;
{$ENDIF}
{$ENDIF}
end;
end;

View File

@ -1316,9 +1316,10 @@ begin
res := 215;
STATUS_ILLEGAL_INSTRUCTION:
res := 216;
STATUS_ACCESS_VIOLATION,
STATUS_DATATYPE_MISALIGNMENT:
STATUS_ACCESS_VIOLATION:
res := 216;
STATUS_DATATYPE_MISALIGNMENT:
res := 214;
STATUS_CONTROL_C_EXIT:
res := 217;
STATUS_PRIVILEGED_INSTRUCTION: