[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [bluetooth-dev] segmentaion fault: btd in usermode
In btd.c the bt_receive_top function for usermode stack is not kept up to date.
The kernel mode function is defined as :
bt_receive_top(u32 con_id, u8 *data, s32 len);
while the usermode function is :
bt_receive_top(rfcomm_con *rfcomm, unsigned char *data, int len);
thus the seg fault when trying to access the rfcomm->line
I'll check in a fix for it.
> -----Original Message-----
> From: Matthias Fuchs [mailto:email@example.com]
> Sent: den 8 mars 2001 16:32
> To: Mattias Ågren; bluetooth-dev
> Subject: Re: [bluetooth-dev] segmentaion fault: btd in usermode
> Mattias Ågren wrote:
> > >
> > > > Regarding your seg fault, are you using the latest code
> on the CVS ?
> > > Yes, i updated this morning ! .. and enabled really all
> > > debugging output
> > > !
> > Well, then it must be the rfcomm_con pointer that is
> invalid since line in rfcomm_con struct is
> > a byte. I think this was due to that you tried to connect
> control channel first and when it failed to
> > to connect the rfcomm_con pointer was never set, never do
> this manually !
> Ok, I tried it, I only connected dlci 2 from the client side manually
> (see below).
> Have you tried enabling all debugging options with the actual cvs
> version ?
> Server :
> client :
> 'rf_conn <address of server> 2 0'
> Things are starting and then seg fault again, same situation:
> hci_receive_data, (19)
> 0x7d 0x26 0xad 0x7d 0x3a 0x5d 0x52 0x7d 0x27 0x7d 0x22
> 0x7d 0x28 0x7d
> 0x22 0x2a
> 0x9c 0x7e 0x65
> hci_receive_data, hci-19
> HCI: hci_receive_data, WAIT_FOR_ACL_DATA
> HCI: hci_receive_data, in_buf->count = 54
> HCI: hci_receive_data, Copied 19 bytes into inbuffer
> HCI: process_acl_data, in_buf->count:54, in_buf->l2cap_len:0
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1026 (LWP 1557)]
> 0x804ba44 in bt_receive_top (rfcomm=0x30004,
> data=0x806d1f3 "~˙}#Ā!}!}!} }4}\"}&} } } }
> }%}&}:]R}'}\"}(}\"*\234~e", len=46)
> at btd.c:2248
> 2248 BT_DATA(" |X|--> %3d [%d]\n", len, rfcomm->line);
> To unsubscribe from this list: send the line "unsubscribe
> bluetooth-dev" in
> the body of a message to firstname.lastname@example.org
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to email@example.com