[JDEV] 'JCF' IRC transport dumping core on channel change
Migs Paraz
map at internet.org.ph
Tue Nov 13 04:19:28 CST 2001
I managed to get the 'JCF' IRC daemon + the patched gabber to work...
I can go to one channel. But when I switch to another, a core dump:
#0 0x401eafc7 in irc_parse_phase_two (m=0x81fd170, flag=1, arg=0x81fc118,
buffer=0x80d146c ":zimdude!zimdude at 203.176.75.45 JOIN :#plug\r\n:upcm.net 353 zimdude = #plug :zimdude @Triumph \r\n:upcm.net 366 zimdude #plug :End of /NAMES list.\r\n", bufsz=144) at irc_out.c:347
347 u->id = jid_new(u->p, spools(p, channel->id, "/", shahash(u->user), p));
(gdb) p channel->id
Cannot access memory at address 0x14
(gdb) p channel
$3 = 0x0
Debug output:
Tue Nov 13 18:07:35 2001 init.c:31 [irc_phandler_receive] got <iq id='A7' to='#plug at irc.localhost' type='set' from='baloney at localhost/Gabber'><enter xmlns='jabber:iq:conference'><nickname>zimdude</nickname></enter></iq>
Tue Nov 13 18:07:35 2001 init.c:49 [irc_phandler_receive] handing off to mtq
Tue Nov 13 18:07:35 2001 mtq 8157238 leaving to pth
Tue Nov 13 18:07:35 2001 mtq 81674D8 entering from pth
Tue Nov 13 18:07:35 2001 mtq 81674D8 queue call 8201BD8
Tue Nov 13 18:07:35 2001 irc_in.c:190 [irc_parser] found a session for user baloney at localhost/Gabber
Tue Nov 13 18:07:35 2001 irc_in.c:284 [irc_parser] starting a new channel for user baloney at localhost/Gabber
Tue Nov 13 18:07:35 2001 mio.c:1032 mio_write called on x: 0 buffer: JOIN #plug
Tue Nov 13 18:07:35 2001 mtq 81674D8 leaving to pth
Tue Nov 13 18:07:35 2001 mio.c:600 mio while loop top
Tue Nov 13 18:07:35 2001 mio.c:613 mio while loop, working
Tue Nov 13 18:07:35 2001 mio.c:275 write_dump writing data: JOIN #plug
Tue Nov 13 18:07:35 2001 mio.c:600 mio while loop top
Tue Nov 13 18:07:35 2001 mio.c:613 mio while loop, working
Tue Nov 13 18:07:35 2001 mio.c:750 MIO read from socket 14: :zimdude!zimdude at 203.176.75.45 JOIN :#plug
:upcm.net 353 zimdude = #plug :zimdude @Triumph
:upcm.net 366 zimdude #plug :End of /NAMES list.
Tue Nov 13 18:07:35 2001 irc_out.c:279 [irc_parse_phase_two] in phase two: m81FD170 flag:1, arg:81FC118, buffer: :zimdude!zimdude at 203.176.75.45 JOIN :#plug
:upcm.net 353 zimdude = #plug :zimdude @Triumph
:upcm.net 366 zimdude #plug :End of /NAMES list.
, bufsz:144
Tue Nov 13 18:07:35 2001 log.c:105 <log type='alert' from='irc_out.c:337'>[irc_parse_phase_two] Unable to get channel #plug</log>
Tue Nov 13 18:07:35 2001 deliver.c:460 DELIVER 3:337 <log type='alert' from='irc_out.c:337'>[irc_parse_phase_two] Unable to get channel #plug</log>
Tue Nov 13 18:07:35 2001 deliver.c:651 delivering to instance 'elogger'
20011113T10:07:35: [alert] (irc_out.c:337): [irc_parse_phase_two] Unable to get channel #plug
Tue Nov 13 18:07:35 2001 dnsrv.c:143 dnsrv: Read error on coprocess(1): 2 No such file or directory
Tue Nov 13 18:07:35 2001 dnsrv.c:157 DNSRV CHILD: out of loop.. exiting normal
Segmentation fault (core dumped)
I looked at the code of irc_out.c:
channel = xhash_get(s->channels, make_lowercase(icpr->next));
if(icpr->from == NULL)
continue;
if (channel == NULL) {
log_error(ZONE,"[irc_parse_phase_two] Unable to get channel %s", icpr->next);
}
ptr = strchr(++icpr->from, '!');
ptr[0] = '\0';
/* someone is joining the channel */
p2 = pool_new();
u = pmalloco(p2, sizeof(_user));
u->p = p2;
u->user = make_lowercase(pstrdup(u->p, icpr->from));
u->id = jid_new(u->p, spools(p, channel->id, "/", shahash(u->user), p));
So, if channel == NULL, the error is printed but jid_new is called just the
same. What causes channel to be null?
More information about the JDev
mailing list