egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

eggdrop 1.6.20 + SSL patch segfaults with HAVE_NOTIFIERS = 1

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
paef
Voice


Joined: 27 Sep 2008
Posts: 3

PostPosted: Tue Aug 10, 2010 10:30 pm    Post subject: eggdrop 1.6.20 + SSL patch segfaults with HAVE_NOTIFIERS = 1 Reply with quote

As stated in topic, when we have
#define HAVE_TCL_SETNOTIFIER 1
in config the eggdrop segfaults when i try to start it. Traced that to the init_ssl function which sets a threaddata structs ssl part to null.

However when HAVE_TCL_SETNOTIFIER is set this struct doesn't seem to get initiated when looking at the code in main.c.

So to my question is it bad to unset this in config? Will the ssl work if we add another ifndef statement within init_ssl for the part of that function that segfaults.

Codeparts that matter:
main.c:
Code:

1033 #ifndef REPLACE_NOTIFIER
1034   init_threaddata(1);
1035 #endif


net.c:
Code:

 144 void init_ssl()
 145 {
 146   int i;
 147   struct threaddata *td = threaddata();
 148
 149   for (i = 0; i < td->MAXSOCKS; i++) {
 150     td->socklist[i].ssl = NULL;
 151   }
 152   ...........
Back to top
View user's profile Send private message
thommey
Halfop


Joined: 01 Apr 2008
Posts: 73

PostPosted: Wed Aug 11, 2010 12:14 pm    Post subject: Reply with quote

The replacement notifier is a Good Thing. You don't want to undefine that.

init_tcl initializes the threaddata, so it's required to be run before init_ssl.

The main.c:1034 init_threaddata(1); is just required in case the notifier isn't replaced => init_tcl doesn't cause it to be initialized.

So, the solution I propose is moving init_ssl (main.c:1040) a few lines so that init_tcl() is called before it (or vice versa) in the SSL patch. I could reproduce the crash and moving init_ssl to after init_tcl solved it for me. (Maybe report it as bug to the SSL patch author?)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber