Thanks to the weekly chat on AOLServer hosted every Thursday: * used libefence to locate a large for loop with an for loop that was populating a malloc structure, that was causing access to unallocated memory.
* increased the malloced bytes by 3 bytes in the PBM package. * after that, the graphic was drawn nicely. Great AIM chat forum for anyone to brainstorm ideas. Helped me a lot. Sanju. ps. one of the comments in the chat was that "use libefence, it'll show you probably a big for loop....!". nice call. -----Original Message----- From: Sanjivendra Nath [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 7:45 AM To: AOLserver Discussion Subject: RE: [AOLSERVER] segmentation violation: gdb stack trace WAS RE: [AOLSERVER] Trying to debug a C module? Did a trace with a break on __libc_malloc and __libc_free. Noticed that not 100% of the calls that I traced for a while were going through ns_malloc. A couple of them called malloc directly. Would that make a difference? Looking at the ns_malloc code, it wouldn't seem to, 'cos if things go ok, it calls malloc. Is it absolutely essential to use ns_malloc and ns_free in the tcl interface for the module? Also, ns_malloc(80kbytes) is done. Not sure if that would be a cause of concern. -----Original Message----- From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Sanjivendra Nath Sent: Thursday, October 25, 2001 7:09 AM To: [EMAIL PROTECTED] Subject: Re: [AOLSERVER] segmentation violation: gdb stack trace WAS RE: [AOLSERVER] Trying to debug a C module? Yes, very reliably, every time. Same place, same stack trace. In fact, if I change the adp source from: 1. pbm_new my_proc -transparent white -fill blue 6 6 (or 6 5 or 5 6 - choose any combination) to 2. pbm_new my_proc -transparent white -fill blue 5 5 the seg. violation occurs on the next pbm statement. Otherwise, it occurs on 1. -----Original Message----- From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf Of Rob Mayoff Sent: Wednesday, October 24, 2001 10:20 PM To: [EMAIL PROTECTED] Subject: Re: [AOLSERVER] segmentation violation: gdb stack trace WAS RE: [AOLSERVER] Trying to debug a C module? Can you reproduce it reliably? +---------- On Oct 24, Sanjivendra Nath said: > Any pointers on how to resolve this? Use libefence (or other tools) to try > to find the offending malloc/free line for corruption of heap? (Using linux > RH7.1)