1828394 Members
2744 Online
109977 Solutions
New Discussion

ldiv.c

 
SOLVED
Go to solution
rajanandhini
Advisor

ldiv.c

Hi,

Iam getting an error regarding ldiv.c. I gave a global search and i was not able to find this ldiv.c file anywhere. While executing the program Iam getting a core as follows

Program terminated with signal 8, Arithmetic exception.
FPE_INTDIV - integer divide by zero
#0 0x60000000c5347060:2 in _div32I () at ldiv.c:558
558 ldiv.c: No such file or directory.
in ldiv.c
(gdb) bt
#0 0x60000000c5347060:2 in _div32I () at ldiv.c:558
#1 0x60000000c5288950:0 in DumpTime () at common.c:6702
#2 0x60000000c52e1240:0 in MontPendingNotice (mspn=1) at pendntfc.c:353
#3 0x400c420:0 in GetWork () at fabrptmod.c:1409
#4 0x4006a50:0 in main (argc=5, argv=0x7ffff060) at fabrptmod.c:707

Please help me in this regard.

Thanks,
nan
3 REPLIES 3
Steven Schweda
Honored Contributor

Re: ldiv.c

I'd forget about ldiv.c, which sounds like
part of a system library, and worry about
line 6702 in common.c, where you appear to
be trying to divide something by zero.

> nan

That's close. Look for "nan" (not a number)
in /usr/include/math.h.
Andrew Merritt_2
Honored Contributor
Solution

Re: ldiv.c

The error you are getting is a divide by zero, which is being detected in the library module _div32l, the source file for which just happens to be ldiv.c. Since you don't have the source for the library module, gdb can't find it. This is not an error.

You need to look at the calling code to determine why zero is being passed.

Andrew
Dennis Handly
Acclaimed Contributor

Re: ldiv.c

>Steven: > nan
>That's close. Look for "NaN" (not a number)

Not quite. When you divide non-zero by 0, you get an INFINITY. :-)

>Andrew: library module _div32l ...

Yes, this is defined in /usr/lib/hpux##/milli.a.