On Thu, Oct 10, 2002 at 01:49:13AM -0700, Rohit wrote: > But here is one. Below is the output from gdb's command "where" - the > stack at the time of failure. I get a segmentation violation while > running - at the time of a malloc. There are printf statements both > before and after the malloc - as well as /proc/meminfo is examined > before and after malloc. > > malloc - supposed to return null if the request is not complete - seems > to be crashing. Take a look and see if anyone can see something good > here? [wrapped lines are actually contiguous]
[Assuming you have a typedef struct RegistryItem RegistryItem; hidden somewhere] Segfault at malloc() is usually seen when you go over the boundaries of a previous malloc. So, check your code and see if you are overshooting a malloc'ed block earlier in your control flow. The internal tables the memory management routines maintain get corrupted in such cases, and further calls to malloc() get segmentation violations. Also, while debugging with *printf()'s, either use fprintf() or follow every printf() with a fflush(stdout). Binand -- If you found this helpful, please take some time off to rate it: http://svcs.affero.net/rm.php?r=binand ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
