gnokii-users
[Top][All Lists]
Advanced

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

Re: Problems with newest smsd


From: Jan Derfinak
Subject: Re: Problems with newest smsd
Date: Tue, 6 Aug 2002 14:24:17 +0200 (CEST)

On Tue, 6 Aug 2002, Michael Meier wrote:

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1026 (LWP 19876)]
> 0x40076c58 in ValidateSMS () from /usr/local/lib/libgnokii.so
> (gdb) info stack
> #0  0x40076c58 in ValidateSMS () from /usr/local/lib/libgnokii.so
> #1  0x40076cbd in P7110_GetSMS () from /usr/local/lib/libgnokii.so
> #2  0x40074386 in SM_Functions () from /usr/local/lib/libgnokii.so
> #3  0x40071594 in RequestSMS () from /usr/local/lib/libgnokii.so
> #4  0x400715f4 in GetSMS () from /usr/local/lib/libgnokii.so
> #5  0x0804ab47 in RefreshSMS (number=10) at lowlevel.c:263
> #6  0x0804ae8d in Connect (a=0x0) at lowlevel.c:403
> #7  0x4002a7e1 in pthread_start_thread () from /lib/i686/libpthread.so.0
> #8  0x4002a8e5 in pthread_start_thread_event () from
> /lib/i686/libpthread.so.0
> (gdb) 

Please try to change definition of variables in RefreshSMS (add
static to folder and folderlist):

static void RefreshSMS (const gint number)
{        
  static GSM_Data data;
  GSM_Error error;
  GSM_API_SMS *msg;
  static SMS_Folder folder;
  static SMS_FolderList folderlist;
  register gint i;

and try again. For explanation I'm not sure but I think that somewhere in
libgnokii code we overwriten memory. Folder and folderlist are on stack
and overwriting can corrupt stack and lead to segfault. I need to test
if moving to data segment will bring any change.

                                jano

-- 
The idea of networking is probably as old as telecommunications itself.
Consider people living in the stone age, where drums may have been used to
transmit messages between individuals. Suppose caveman A wants to invite
caveman B for a game of hurling rocks at each other, but they live too far
apart for B to hear A banging his drums. So what are A's options? He could 
1) walk over to B's place,
2) get bigger drum,
3) ask C, who lives halfway between them, to forward the message.
The last is called networking.
                Olaf Kirch "The Linux Network Administrations' Guide"




reply via email to

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