RE: memory fault, core dump
Posted in 2000
Topics: Installation, Setup & Upgrades, Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
Dee Wampler Technical Leader > -----Original Message----- > From: David Williams [SMTP:djw@smooth1.demon.co.uk] > Sent: Saturday, May 13, 2000 8:03 AM > To: informix-list@iiug.org > Subject: Re: memory fault, core dump > > In article <8fhch5$sfo$1@news.xmission.com>, Wampler, Dee > <wampled@hastings-ent.com> writes > > > >We have had problems with the 730 tools getting a memory fault core dump > >problem in various programs > > > >Example: > >main > >call dis_call() > >end main > >function dis_call() > >display "craptest" > >sleep 5 > >end function > > Which platform are you running on ? [Wampler, Dee] SCO > Which C compiler and what is your PATH set to? [Wampler, Dee] SCO UNIX Development System Release 5.1.1A 27Jul98 > >This gets a memory fault core dump > > > >main > >display "craptest" > >sleep 5 > >end main > > > >this works fine > > > >Any suggestions? > > > >Dee Wampler > >Technical Leader > > > >> -----Original Message----- > >> From: Art S. Kagel [SMTP: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 > >> > > -- > David Williams
On Mon, 15 May 2000 11:04:12 -0500 Wampler, Dee wrote: >> From: David Williams [SMTP:djw@smooth1.demon.co.uk] >> Sent: Saturday, May 13, 2000 8:03 AM >> To: informix-list@iiug.org >> Subject: Re: memory fault, core dump >> >> In article <8fhch5$sfo$1@news.xmission.com>, Wampler, Dee >> <wampled@hastings-ent.com> writes >> > >> >We have had problems with the 730 tools getting a memory fault core dump >> >problem in various programs >> > >> >Example: >> >main >> >call dis_call() >> >end main >> >function dis_call() >> >display "craptest" >> >sleep 5 >> >end function >> >> Which platform are you running on ? > [Wampler, Dee] > SCO >> Which C compiler and what is your PATH set to? > [Wampler, Dee] SCO UNIX Development System Release 5.1.1A 27Jul98 > This is a shot in the dark but have you applied the SCO linker patch ? I think it is rss499 but its a while since I installed it - there were some bugs in the dynamic linking that certain tools managed to tickle. However I have also seen core dumps when assigning to global variables with that patch applied - I have found that moving the order of statements fixes it but havent given it more profound study. /J\\ -- If something is to hard to do, then it's not worth doing. You just stick that guitar in the closet next to your shortwave radio, your karate outfit and your unicycle and we'll go inside and watch TV. -- fortune oscar homer
On 16 May 2000 08:26:37 +0100, Jonathan Stowe Wrote: > > This is a shot in the dark but have you applied the SCO linker patch ? I > think it is rss499 but its a while since I installed it - there were > some bugs in the dynamic linking that certain tools managed to tickle. That is oss499a to be more precise (now I am in the office). /j\\