This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

eggdrop 1.6.20 + SSL patch segfaults with HAVE_NOTIFIERS = 1

General support and discussion of Eggdrop bots.
Post Reply
p
paef
Voice
Posts: 3
Joined: Sat Sep 27, 2008 9:23 pm

eggdrop 1.6.20 + SSL patch segfaults with HAVE_NOTIFIERS = 1

Post by paef »

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: Select all

1033 #ifndef REPLACE_NOTIFIER
1034   init_threaddata(1);
1035 #endif
net.c:

Code: Select all

 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   ...........
t
thommey
Halfop
Posts: 76
Joined: Tue Apr 01, 2008 2:59 pm

Post by thommey »

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?)
Post Reply