gnokii-users
[Top][All Lists]
Advanced

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

Re: smsd core dump


From: Pawel Kot
Subject: Re: smsd core dump
Date: Thu, 5 Sep 2002 15:20:29 +0200 (CEST)

On Thu, 5 Sep 2002, Paulius Bulotas wrote:

> Breakpoint 2, SM_IncomingFunction (state=0x8059da0, messagetype=0 '\000', 
> message=0x806d2b0, messagesize=0)
>     at gsm-statemachine.c:95
> 95      {
> (gdb) n
> 97              int temp = 1;
> (gdb) n
> 99              GSM_Data *data = &emptydata;
> (gdb) print emptydata
> Error accessing memory address 0xbfaec70c: Bad address.

I have no clue what's wrong. Here's the code:
<code>
void SM_IncomingFunction(GSM_Statemachine *state, u8 messagetype, void 
*message, u16 messagesize)
{
        int c;
        int temp = 1;
        GSM_Data emptydata;
        GSM_Data *data = &emptydata;
</code>
Maybe you don't have enough memory? Or some other corruption? You may try
the following code:
        GSM_Data *emptydata = calloc(1, sizeof(GSM_Data);
        GSM_Data *data = emptydata;
        [remove GSM_DataClear(&emptydata)]
and add free(emptydata) on the return path (before every return);

pkot
-- 
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku





reply via email to

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