Re: Segmentation faults in PRO*C programs: HELP ??

From: Peter Sylvester <peters_at_mitre.org>
Date: 1995/06/26
Message-ID: <peters-260695073632_at_dlambert.mitre.org>#1/1


In article <3sfdpa$1doe_at_unix1.sncc.lsu.edu>, eevnr_at_unix1.sncc.lsu.edu (Venkatesh Rao) wrote:

[clip]
> Sometimes when we have to call a function which has some embedded SQL
> but it is present in a different program module the
> application crashes with a core dump.
>
> We tried putting all the code into a single module and the application
> never gave any core dumps.
>

[clip]

Sounds like a classic case of memory overwrite taking place. Rearranging the modules might make the overwrite happen in a less critical data area, but the problem is probably still there. Run the program under a debugger to determine the problem area. Pay particular attention to strcpy() and memcpy() routines. The use of a tool such as Purify or ObjectCenter can detect these problems - but generally only at run time.

-- 
Peter Sylvester
MITRE Corp.
Bedford, MA
(peters_at_mitre.org)
Received on Mon Jun 26 1995 - 00:00:00 CEST

Original text of this message