Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: os_confinfo causing segmentation fault ....  (Read 6043 times)

0 Members and 1 Guest are viewing this topic.

robclements1962

  • Guest
os_confinfo causing segmentation fault ....
« on: September 11, 2007, 06:44:19 PM »

Hi All,
Installed os_confinfo module (Anope 1.7.19 on Unreal3.2.6) and on use it causes services to fail with the message

' Global -- from services.surrealchat.co.uk: PANIC! buffer = :administrator PRIVMSG OperServ@services.surrealchat.co.uk :confinfo nick'

Starting services in debug mode shows 'Sementation Fault (core dumped)'

I am able to restart services without problem, reload os_confinfo and everything is fine again .. until I use any command for confinfo again.
Any help will be greatly appreciated, as the module is of great use to me.
Thanks in advance,
Rob.
Logged

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #1 on: September 11, 2007, 08:59:25 PM »

The same for me (Unreal3.2.7 and Anope 1.7.19) for the command /msg operserv confinfo basic, but my comment on the modules site for this has been deleted! :(
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

katsklaw

  • Guest
(No subject)
« Reply #2 on: September 12, 2007, 04:23:28 AM »

Quote
Originally posted by Armadillo
The same for me (Unreal3.2.7 and Anope 1.7.19) for the command /msg operserv confinfo basic, but my comment on the modules site for this has been deleted! :(


That is because you seemed to have missed or ignored this: "NOTE: Please do not ask for help here! If you have an issue with a module, please post it on the forum. If you have found a severe bug, please contact the author directly."

this note applies to ALL modules on the entire site, not just mine. It's a comments system, not a bug report system.

At anyrate, I need debug logs and or a full backtrace showing what happens because I have no problems with the module.
Logged

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #3 on: September 12, 2007, 06:16:04 AM »

hm ok, good argument^^
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #4 on: September 12, 2007, 03:41:34 PM »

Okay the segfault

Program received signal SIGSEGV, Segmentation fault.
0xb7c0d349 in free () from /lib/libc.so.6
(gdb) bt
#0  0xb7c0d349 in free () from /lib/libc.so.6
#1  0xb7a794ed in do_confstart (u=0x83d3f68) at os_confinfo.c:426
#2  0x080679ab in do_run_cmd (service=0x80d9c58 "OperServ", u=0x83d3f68, c=0x83d5e80, cmd=0xbfdb8f10 "confinfo") at commands.c:101

The reason.. you can't free what is an int pointer..

char *my_userdb = NULL;

   Directive confvalues26[] = {
       { "UseRDB", { { PARAM_SET, PARAM_RELOAD, &my_userdb } } }
   };

once passed to the parser my_userdb becomes an int pointer, not a char pointer, you can not free what is an int, redeclare as

int my_userdb = 0;

and remove the free(my_userdb); and your segfaults will go away
Logged
my God my tourniquet, return to me salvation

katsklaw

  • Guest
(No subject)
« Reply #5 on: September 13, 2007, 02:21:46 AM »

Thanks Trystan, I'll get right on it.
Logged

katsklaw

  • Guest
(No subject)
« Reply #6 on: September 14, 2007, 08:07:23 PM »

Logged

Armadillo

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 72
    • http://www.penguinfriends.org
(No subject)
« Reply #7 on: September 14, 2007, 11:29:11 PM »

Ok, the "basic" and the "nick" options now work, but on the "chan" option i also get a segfault.

Unreal 3.2.7
Anope 1.7.19
openSuse 10.0 x64_64
Logged
IRC-Network: irc.PenguinFriends.org | Website: www.PenguinFriends.org
Anope: 1.9.9 | InspIRCd: 2.0

katsklaw

  • Guest
(No subject)
« Reply #8 on: September 15, 2007, 12:09:22 AM »

Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #9 on: September 15, 2007, 01:18:33 AM »

Quick scan of the code says there is a segfault waiting to happen at

my_bscasesensitive <-- int pointer
Logged
my God my tourniquet, return to me salvation

katsklaw

  • Guest
(No subject)
« Reply #10 on: September 15, 2007, 03:02:22 AM »

*sigh*, thanks Trystan. I'll get a good release out this weekend at some time ...
Logged

katsklaw

  • Guest
(No subject)
« Reply #11 on: September 15, 2007, 08:36:34 PM »

I've rolled back all changes made for versions 2.2 and 2.3x. The latest publiclly available version is 2.1, which is before I fixed warnings issued to alog and/or LogChan about not enough parameters.

Once I get a proper fix for the warnings that does not cause segfaults, I'll release it. Anyone using 2.2 or 2.3x should revert to 2.1 or use at your own risk!

There will be no further support for 2.2 or 2.3x until further notice.
Logged

Trystan Scott Lee

  • Contributor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 343
(No subject)
« Reply #12 on: September 15, 2007, 11:38:28 PM »

what warnings? send me them in pm and will see what you got going on.,
Logged
my God my tourniquet, return to me salvation
Pages: [1]   Go Up