<html><head></head><body><div class="ydp5afdf881yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><div><div dir="ltr" data-setdir="false">I use FPC 3.0.4 on Ubuntu 16.04</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I get same behavior after compile it with ppc386. 64bit binary executable run OK<br></div><div><br></div><div class="ydp5afdf881signature">Zamrony P. Juhara</div></div><div><br></div><div>Fano Framework, Free Pascal web application framework https://fanoframework.github.io</div><div><br></div>
</div><div id="ydp8c64d33byahoo_quoted_0807546966" class="ydp8c64d33byahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Friday, October 11, 2019, 4:39:38 PM GMT+8, Bernd Mueller <mueller.b@gmx.net> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div dir="ltr">Hello,<br></div><div dir="ltr"><br></div><div dir="ltr">FPC 3.0.4, Linux i386<br></div><div dir="ltr"><br></div><div dir="ltr">the following program should catch the floating point exception<br></div><div dir="ltr">(always), but crashes on the fourth call to the procedure Run:<br></div><div dir="ltr"><br></div><div dir="ltr">program test;<br></div><div dir="ltr">{$mode objfpc}{$H+}<br></div><div dir="ltr"><br></div><div dir="ltr">procedure Run;<br></div><div dir="ltr">var<br></div><div dir="ltr"> r: Real;<br></div><div dir="ltr"> i: Integer;<br></div><div dir="ltr">begin<br></div><div dir="ltr"> i:= 1;<br></div><div dir="ltr"> try<br></div><div dir="ltr"> r:= i / 0.0;<br></div><div dir="ltr"> except<br></div><div dir="ltr"> r:= 0; // Crash here on fourth call.<br></div><div dir="ltr"> end;<br></div><div dir="ltr"> Writeln('ok');<br></div><div dir="ltr">end;<br></div><div dir="ltr"><br></div><div dir="ltr">begin<br></div><div dir="ltr"> Run;<br></div><div dir="ltr"> Run;<br></div><div dir="ltr"> Run;<br></div><div dir="ltr"> Run;<br></div><div dir="ltr">end.<br></div><div dir="ltr"><br></div><div dir="ltr">The output:<br></div><div dir="ltr">ok<br></div><div dir="ltr">ok<br></div><div dir="ltr">ok<br></div><div dir="ltr">Runtime error 207 at $080480F9<br></div><div dir="ltr"> $080480F9<br></div><div dir="ltr"> $0804815C<br></div><div dir="ltr"> $0806644D<br></div><div dir="ltr"><br></div><div dir="ltr">The program was compiled with no additional compiler parameters.<br></div><div dir="ltr">I could not reproduce this problem with the trunk version of the<br></div><div dir="ltr">compiler, but all versions down to 2.2.2 show the described behavior.<br></div><div dir="ltr">FPC 2.2.0 is working correct. The 64-bit version of FPC 3.0.4 works<br></div><div dir="ltr">correct too.<br></div><div dir="ltr"><br></div><div dir="ltr">Is this something for the bug tracker?<br></div><div dir="ltr"><br></div><div dir="ltr">Regards, Bernd.<br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr">fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" rel="nofollow" target="_blank">fpc-pascal@lists.freepascal.org</a><br></div><div dir="ltr"><a href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" rel="nofollow" target="_blank">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br></div></div>
</div>
</div></body></html>