[lazarus] SIGFPE in fpc_round
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Nov 29 10:04:12 EST 2003
On Sat, 29 Nov 2003 15:49:03 +0100 Florian Klaempfl
<Florian.Klaempfl at gmx.de> wrote:
> Mattias Gaertner wrote:
>
> > Hi,
> >
> > I spotted a bug in current fpc 1.9.1 and the Round function.
> > I was not able to reproduce the error in a small context or find the bug
> > in the fpc bug list. Perhaps the needed context has something to do with
> > the gtk libs. So, maybe someone else knows this bug:
> >
> > The bug appears in gtkwinapi.inc 7773 in the line
> > "Result:=Round(Value);":
> >
> > Program received signal SIGFPE, Arithmetic exception.
> > 0x0813ca57 in fpc_round ()
> >
> > Value is 0, so rounding should be pretty easy.
> > Adding a writeln(Value); in front "fixes" the bug.
> >
> > Any clues/hints?
>
> Can you set a break point before the round call and post an fpu dump
> (including status registers)?
Breakpoint 1, TGTKOBJECT__SETSCROLLINFO (HANDLE=144650600, SBSTYLE=1,
SCROLLINFO=
{CBSIZE = 28, FMASK = 103, NMIN = 0, NMAX = 0, NPAGE = 244, NPOS = 0,
NTRACKPOS = 0}, BREDRAW=false,
this=$81a3594, result=0, ADJUSTMENT=$89f5e18, SCROLL=$89f5158,
NEWPOLICY=-1073744992) at gtkwinapi.inc:7776
7776 gtkwinapi.inc: No such file or directory.
in gtkwinapi.inc
Current language: auto; currently pascal
(gdb) info float
R7: Empty 0x00000000000000000000
=>R6: Empty 0x40058bffffffffffe000
R5: Empty 0x3ffed406483ed274388a
R4: Empty 0x4000c000000000000000
R3: Empty 0x4006f300000000000000
R2: Empty 0x3ffe95a578c9c6fc07ee
R1: Empty 0x3ffe95a578c9c6fc07ee
R0: Empty 0x4006b400000000000000
Status Word: $3061 IE PE SF
TOP: 6
Control Word: $037f IM DM ZM OM UM PM
PC: Extended Precision (64-bits)
RC: Round to nearest
Tag Word: $ffff
Instruction Pointer: $00:$00000000
Operand Pointer: $00:$00000000
Opcode: $0000
(gdb) c
Continuing.
Program received signal SIGFPE, Arithmetic exception.
$0813ca47 in fpc_round ()
Mattias
More information about the Lazarus
mailing list