[Gc] Bus error in GC6.3

Simon Johansson simon.johansson at ladok.umu.se
Tue Sep 7 05:59:18 PDT 2004



I will get this error every time I use my application after a while.


I am using GC6.3 on a Solaris 8 server. 


I am compiling with this options -DGC_SOLARIS_PTHREADS -DPARALLEL_MARK


Have also tested with –DGC_PTHREADS but the error is the same.


The error look like this:


#0  0xff146050 in GC_malloc (lb=1624) at malloc.c:305

305             *opp = obj_link(op);

(gdb) where

#0  0xff146050 in GC_malloc (lb=1624) at malloc.c:305

#1  0xa23f0 in enqueue ()

#2  0xa2734 in AddToUnifaceQueue ()

#3  0x7afac in GetData ()

#4  0x7ddd0 in Main_CT_Thread ()


The bus error I am getting is: Signal 10 SIGBUS Sigcode 1 ADRALN Sigsender



The line in the source code that is not working, look like this.


if ((p = (elem *)malloc(sizeof(elem))) == NULL)


Where elem is a struct looking like this.


struct elem{

           boolean ReturnData;

           char *UserName;

           char *Pinghsk;

           DataStructType        d;

           struct elem *next;


typedef struct elem elem;


typedef struct DataStruct {

           int TransType;// tre teckens transtyp

           int NumUsed;

           char *DataFields[400];           // pekare till alla stängar

} DataStructType;


typedef struct DATASTRUCTTYPE  * DataStructTypePtr;



I have also tested to convert from malloc to GC_MALLOC_ATOMIC but I am
getting the same error.


If I make the char *DataFields[400] to only be char *DataFields[100] the
program will run a lot longer before it core.


What can I do to get around the problem? Are there some value for max memory
that I can make bigger?










-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://napali.hpl.hp.com/pipermail/gc/attachments/20040907/bc801789/attachment.html

More information about the Gc mailing list