Informix tools - Peculiar problem
Posted in 1999
Hi guys, We recently moved from I-4GL 7.20 UD4 to 7.20 UE1. Database was moved from 7.22 to 7.31 UC2. We have a subsystem which accepts data on Radio Display Terminals and sends the data to the Informix database through a base station (spread spectrum antenna). We have written this using I-4GL and lot of 'C'. This application was working in production and we never had any problem. We migrated to 7.20 UE1 and we got core dump. I was debugging the app by inserting debug statements to a database table and suddenly it worked. I found that the app was core dumping due to a free() unix call which de-allocates the memory it allocated earlier in the code. I put an insert statement (SQL) before this free and it worked. The only reason I can think of is due to the insert statement informix allocated memory for internal data structures and this seemed to have changed something in the memory which freed the memory and app started working. So, I created the 'C' code (c4gl -c) and analysed it. While inserting into the table two calls were used "mark_stack" and "rest_stack", I put them in a function and called it before the free and app worked fine. I have tried all the basic things like, 1. Checking, the memory freed was the memory allocated. 2. Check the "cc" flags. 3. Compared the HP-UX libs (btw, we are running our app on HP9000 HP-UX 10.20) Can you guys throw some more light on this? What baffles me is how did it work on UD4 and not on UE1? -Kris