swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] crash caused by malloc


From: Yifeng Zhang
Subject: [Swarm-Support] crash caused by malloc
Date: Tue, 11 Jan 2005 14:45:33 -0800 (PST)

Hi everyone:
 
I've been using Swarm for sometime. However I hit a problem that I couldn't solve recently. I hope that somebody here can help me with it. I am running Swarm-2.2 the latest release under Windows XP. My program crashes and the crash seems to be related to malloc. I am sure that it's not because of insufficient memory. First here's the error message that I got from gdb:
 
Program received signal SIGSEGV, Segmentation fault.
0x0040131d in +[Intermediary createBegin:] (self=0x411440, _cmd=0x411f48,
    aZone=0x107430a8) at intermediary.m:14
 
The crash happens at this statement:
 
obj->last_update_time = SSC_START_UPDATE_TIME;
 
where obj is of type Intermediary*, last_update_time is of type int, and SSC_START_UPDATE_TIME is a constant.
 
Using gdb I also found the memory for obj->last_update_time is not accessible. The reason that I think the crash is related to malloc is that at the time of crashing, I got the following stack from insight:
 
...
+[Intermediary createBegin:]
malloc
 
Also, my program used to crash at some malloc statements written by myself. Then I tried xmalloc, allocBlock. Still the program crashed at these statements. I thought I would avoid the problem by not using dynamic memory allocation and used static arrays instead. But, apparently, the prolem is still there. By the way, my Intermediary class contains a lot of member variables, maybe 50 of them. Does that matter?
 
Any help will be appreciated. Lots of thanks in advance.
 
Yifeng
 
 
 
 
 



Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]