Board index » kylix » Kylix 3 & SIGFPE

Kylix 3 & SIGFPE


2005-09-16 05:25:43 PM
kylix2
Hello all,
I am a bit in the dark about Kylix 3, Redhat 7.3 and greater and SIGFPE
signals. If I execute to process generated by the following code:
program test_div;
uses
SysUtils,
DateUtils;
begin
writeln(IntToStr(10 div secondsbetween(now,now) ))
end.
I end up with a process taking up all available CPU cycles and only
killable by a kill -9 (because I do not have a sighandler).
If I add a sighandler and catch the SIGFPE signal, the process seems to
generate an endless stream of SIGFPE. I can end the execution by raising
an:
raise EDivByZero.Create('Floating Point Error');
I do know that a div with zero is bad, but the looping behaviour should be
prevented by having the SIGFPE properly raised as an exception. I see a
simular behaviour in production code and need to resolve this.
I have found that for Kylix 1 there was an issue and this was supposedly
fixed by:
sourceforge.net/tracker/index.php
-or-
tinyurl.com/dcqor
Applying this patch is appareantly already done in Kylix 3... However I
still do not get an exception...
If I compare the SysUtils.pas from the FreeCLX package, I see a lot of
changes. However I cannot judge (wihtin the time available) whether this
is a newer or older implementation.
To make a long story short:
Do I need to write my own sighandler to generate correct Exceptions or is
their either a work around or a patch that I need to apply?
FYI, compiling the same code in Delphi7 generates an 0xc0000094 exception
('Integer Divide by Zero Exception')..
Thanks in advance for your help.
Regards,
Diederik
[Followup to borland.public.kylix.rtl set, posted in
borland.public.kylix.non-technical to get more attention...]
 
 

Re:Kylix 3 & SIGFPE

Quote
[Followup to borland.public.kylix.rtl set, posted in
borland.public.kylix.non-technical to get more attention...]

Please respond in non-technical as rtl does not seem to contain this
message...
Regards,
Diederik