RE: memory fault, core dump
Posted in 2000
Topics: Installation, Setup & Upgrades, Connectivity: ESQL/C, 4GL & Embedded SQL
I just wanted to let everyone know that we have tracked down the problem. It seems that the error was caused due to a conflict with the patch Informix gave us for the 730tools and a Y2K SCO OS patch. Once Informix loaded the same patches for SCO as we were using they were able to re-produce the error. They are working on a fix for it now. thanks for all your help. -----Original Message----- From: Art S. Kagel [mailto:kagel@bloomberg.net] Sent: Friday, May 12, 2000 9:57 AM To: informix-list@iiug.org Subject: Re: memory fault, core dump "Wampler, Dee" wrote: > We have upgraded to INFORMIX-4GL Version 7.30.UC1X2 > > We added in one global variable (smallint) to an existing program, compiled > using -shared, and it ran fine > Then we set the variable = 0 and got the following error > dynamic linker: program name: invalid relocation type 72 at 0X0 > killed > > If any other code is added, we get a memory fault core dump > > If we recompile with all the code, using -static, the problem goes away and > the program runs fine > > Any ideas? > A guess. You added the one variable, uninitialized, to the GLOBALS file and only recompiled the one module that used the new variable, right? And that worked until you initialized the variable, still only recompiling only the one module, correct? After that the program crashes until you recompiled every module? Makes perfect sense to me! Uninitialized variables are created at runtime and are appended to the address space of the program. However, initialized variables are created at compile time and the initialized data space is lower in memory. Adding a variable that is initialized will cause the addresses of other variables, and perhaps offsets calculated from one to another, to shift. This means that the other modules code became invalid. I strongly suggest you start using make to manage your 4GL compiles and include dependencies on the GLOBALS file for every module's object file. Then you will not have to deal with the confusion again. This is what make is for. Art S. Kagel