A Little trouble with SIGBUS



Hi , I have been developing a glib based Sound lib and when I try to test  it 
in Solaris.  the applications always says the same.

"Bus  Error" (receives the SIGBUS signal....)

I unknown what does exactly this signal..

The test application runs OK on linux. The compilation doesn't show any 
strange message.
And should say , Is not a specific trouble of my lib because , other apps 
(based on gtk only --not my lib--) compiled on solaris takes the same error. 

*********the system ***********

[altonim dttix2::altonim]{2}>uname -a
SunOS dttix2 5.8 Generic_108528-10 sun4m sparc SUNW,SPARCstation-20

******** GDB output.*********
.......
.......
Program received signal SIGBUS, Bus error.
0xee300d34 in waveform_chunk_parse_INFO (ffl=0x24878, wave=0x0, 
ckbuff=0x23cfc, cklen=1018) at gsff-riff.c:1397
1397                    ckID=GSFF_INFO_32RAW_FROM_GPOINTER(relbuff);

*the GSFF_INFO_32RAW_FROM_GPOINTER is a macro further used before 
successfully and relbuff is a g_new() allocated memory buffer.

anyway ...the macro expands to...

#define GSFF_INFO_32RAW_FROM_GPOINTER(__p)                      \
        ({                                                      \
                register guint32 __ret;                         \
                __ret=(((guint32*)(__p))[0]);                   \
                (__p)+=4;                                       \
                __ret;                                          \
        })

when debugging, the value stored in *relbuff , IS CORRECT!!!!
while running macro. Application Crashes.

**************

When System send a SIGBUS signal?

Lots of thanks

-- 
=================
Toni Moreno Giménez
=================
Pje de las rosas  nº 22
Vilassar de Mar 
(Barcelona) Spain
CP: 08340



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