core dumps with 4gl program
Posted in 1999
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
We switched to another development server for Y2K reasons, some Informix-4gl
programs compiled on the new box core dump at run time.
The old server had Informix-4gl version 4.11, the only media we could find
for the new is Informix-4gl version 4.12, the O/S is SunOS 4.1.3_U1, the
compiler is an old version of gcc. Hard to believe, huh? We did put our
applications through a battery of Y2K related tests.
This is the output, it coredumps when it tries to initialize a variable
defined as money(20,2) to 0.00:
after assigning the nitems
Memory fault
This is the 4gl code, Gsubtotal is defined as money(20,2):
display "after assigning the nitems"
let Gsubtotal = 0.00
This is the esql code that gets generated:
$ display "after assigning the nitems";
status = efcode;
if (status < 0)
{
fgl_fatal(fgl_modname, 489, status);
}
pushstrdec(" 0.00 ");
popdec(&gsubtotal);
status = (chkprec(&gsubtotal, 5122)) ? -1226 : 0;
$ display "after assigning the subtotal";
Any ideas? Perhaps an object that wasn't recompiled? We have millions of
lines of legacy code, code and libraries in perhaps 100-200 different
locations on the server (I didn't write this crap), most everything has been
recompiled, but it's possible I missed something.
Thanks,
Alan
Something in a library somewhere not recompiled would be my guess.
Art S. Kagel
Alan wrote:
>
> We switched to another development server for Y2K reasons, some Informix-4gl
> programs compiled on the new box core dump at run time.
>
> The old server had Informix-4gl version 4.11, the only media we could find
> for the new is Informix-4gl version 4.12, the O/S is SunOS 4.1.3_U1, the
> compiler is an old version of gcc. Hard to believe, huh? We did put our
> applications through a battery of Y2K related tests.
>
> This is the output, it coredumps when it tries to initialize a variable
> defined as money(20,2) to 0.00:
> after assigning the nitems
> Memory fault
>
> This is the 4gl code, Gsubtotal is defined as money(20,2):
> display "after assigning the nitems"
> let Gsubtotal = 0.00
>
> This is the esql code that gets generated:
> $ display "after assigning the nitems";
> status = efcode;
> if (status < 0)
> {
> fgl_fatal(fgl_modname, 489, status);
> }
> pushstrdec(" 0.00 ");
> popdec(&gsubtotal);
> status = (chkprec(&gsubtotal, 5122)) ? -1226 : 0;
> $ display "after assigning the subtotal";>
> Any ideas? Perhaps an object that wasn't recompiled? We have millions of
> lines of legacy code, code and libraries in perhaps 100-200 different
> locations on the server (I didn't write this crap), most everything has been
> recompiled, but it's possible I missed something.
>
> Thanks,
> Alan
Alan wrote:
> We switched to another development server for Y2K reasons, some Informix-4gl
> programs compiled on the new box core dump at run time.
>
> The old server had Informix-4gl version 4.11, the only media we could find
> for the new is Informix-4gl version 4.12, the O/S is SunOS 4.1.3_U1, the
> compiler is an old version of gcc. Hard to believe, huh? We did put our
> applications through a battery of Y2K related tests.
>
GCC is the giveaway -- unless you use -fwriteable-strings, you will get core
dumps.
SunOS 4.1.3 is pretty damn ancient. I4GL 4.12 is pretty ancient. You need to
consider
upgrading a lot. Do not modify SCCS files after the 31 December 1999; you will
corrupt your files. You are definitely treading on the thinnest of wafer-thin
ice.
>
> This is the output, it coredumps when it tries to initialize a variable
> defined as money(20,2) to 0.00:
> after assigning the nitems
> Memory fault
>
> This is the 4gl code, Gsubtotal is defined as money(20,2):
> display "after assigning the nitems"
> let Gsubtotal = 0.00
>
> This is the esql code that gets generated:
> $ display "after assigning the nitems";
> status = efcode;
> if (status < 0)
> {
> fgl_fatal(fgl_modname, 489, status);
> }
> pushstrdec(" 0.00 ");
> popdec(&gsubtotal);
> status = (chkprec(&gsubtotal, 5122)) ? -1226 : 0;
> $ display "after assigning the subtotal";>
> Any ideas? Perhaps an object that wasn't recompiled? We have millions of
> lines of legacy code, code and libraries in perhaps 100-200 different
> locations on the server (I didn't write this crap), most everything has been
> recompiled, but it's possible I missed something.
>
> Thanks,
> Alan
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.62 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
Related threads
- problem with sum() aggregate on IDS 7.30
- realease of Informix
- Error 1226 when using sum()? Dynamic Server broken or what?!
- 4gl Error Anyhelp ?