Re: Arithmetic Error on Sun Solaris GCC compiled program

From: Peter Teeson (noone_at_nowhere.com)
Date: 08/29/04


Date: Sun, 29 Aug 2004 00:21:33 GMT

In article <0001HW.BD567B5100277E64F00805B0@news.usenetserver.com>,
 Verne Arase <VerneA@pobox.com> wrote:

> Hello all,
>
> Last year I was an MVS (OS/390) Systems Programmer - this year I'm an
> admin for Sun Solaris, so please be gentle :-).
>
> I've written a ISC dhcpd sanity checker/data extractor/static host
> verifier in C to run as a standard tool on MacOS X 10.3.5/GCC 3.3 under
> Xcode. The sanity checker (chkdhcp) reads the dhcpd.conf and dhcpd.leases
> files and extracts all the relavant info including subnets, host list, and
> static host list and outputs them to a flat file. A host checker (pinghosts)
> then attempts to post-process the static hosts file and check to see that
> they're really there.
>
> Everything runs fine on MacOS X 10.3.5, but when I attempt to port the
> code to a Solaris 5.8 system with GCC 2.95.2 and run, I get:
>
> chkdhcp v1.0a1 begin execution
>
>
> Processing begun on file "/etc/dhcpd.conf"
>
> Arithmetic Exception(coredump)
>
> ... which isn't terribly helpful.
>
> Everything compiles cleanly, I'm running root so there are no permission
> issues. I've used this developement schema to develop code on MacOS X for
> deployment on AIX 5, and it worked nicely - though I guess AIX is also
> PPC-based.
>
> Really, the only things I can think of that I'm counting on arithmetically
> is that I've got an unsigned long int at least 32 bits in length (capable of
> holding an IP address).
>
> Has anyone seen anything like this, and can they point me in a good
> direction - like what in general they've seen cause problems like this or
> what I should be looking at?
>
> Monday I'll be trying it on a Solaris 9 Sunblade I have under my desk
> (with the latest GCC), but I was hoping to get it running on the current
> production system - and that's all I can access from here (home).
>
> Thanks in advance for any response.
>
> -- Verne
>
>

Is this an endian issue?

respect...

Peter
(former 370 Systems Programmer)