gnokii-users
[Top][All Lists]
Advanced

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

Re: [PATCH] fix segfault when running GN_OP_Terminate


From: Bastien Nocera
Subject: Re: [PATCH] fix segfault when running GN_OP_Terminate
Date: Mon, 13 Jun 2005 23:10:02 +0100

Hey Pawel,

On Mon, 2005-06-13 at 20:45 +0200, Pawel Kot wrote:
> Hi Bastien,
> 
> On 6/13/05, Bastien Nocera <address@hidden> wrote:
> > I was getting a segfault when running the GN_OP_Terminate as a function,
> > because it looks like state->device.device_instance was never
> > initialised.
> 
> The patch doesn't seem correct to me. Could you please post the
> sequence of libgnokii calls that led to this situation?

The attached program crashes straight before printing the model for the
phone. It works fine with my patch applied. Maybe some other data needs
to be zero'ed in gn_data_clear?

Use as:
./gnokii-identify <bluetooth address>

It gives me that backtrace:
#0  0x00be0df9 in free () from /lib/tls/libc.so.6
#1  0xb7f945c1 in device_close (state=0xbffff2dc) at device.c:120
#2  0xb7fca274 in link_terminate (state=0xbffff2dc) at utils.c:55
#3  0xb7fa4e1f in pgen_terminate (data=0x0, state=0xbffff2dc) at
generic.c:51
#4  0xb7fc20aa in Terminate (data=0x0, state=0xbffff2dc) at atgen.c:1772
#5  0xb7fc22a6 in Functions (op=GN_OP_Init, data=0x0, state=0xbffff2dc)
    at atgen.c:242
#6  0xb7f927e4 in gn_sm_functions (op=GN_OP_Terminate, data=0x0, sm=0x0)
    at gsm-statemachine.c:347
#7  0x0804885d in main (argc=2, argv=0xbffff6a4) at gnokii-identify.c:56

Cheers

---
Bastien Nocera <address@hidden> 

Attachment: gnokii-identify.c
Description: Text Data


reply via email to

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