View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002706 | unreal | ircd | public | 2005-11-22 12:53 | 2015-05-27 18:23 |
| Reporter | Nazzy | Assigned To | syzop | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | wont fix | ||
| Product Version | 3.2.4 | ||||
| Summary | 0002706: Channel modes aren't being released properly when their parent module is being unloaded. | ||||
| Description | According to the API doc: "The CmodeDel function destroys the channelmode that was created with the CmodeAdd function. It is recommended, but not required that you call this function in your Mod_Unload." I found out the hard way that this is incorrect. When a module is unloaded, it doesn't appear to be dealing with the channel mode properly ... instead it leaves a wild pointer, meaning that any attempt to unset (and possibly set) the offending channel mode causes a crash. | ||||
| Steps To Reproduce | Pretty simple really ... create a module that isn't flagged perm and don't place an CmodeDel call in it. Add to config file, rehash, recompile module, rehash, *boom* :) | ||||
| Additional Information | Backtrace: #0 0xb7e02ca0 in ?? () #1 0xb7e50c4c in do_extmode_char (chptr=0x817dea0, modeindex=0x3, param=0x0, what=0x20000000, cptr=0x819dc58, pcount=0xbfffe74c, pvar=0xbfffe750, bounce=0x0) at m_mode.c:1714 #2 0xb7e51132 in _set_mode (chptr=0x817dea0, cptr=0x819dc58, parc=0x1, parv=0x811e548, pcount=0xbfffe74c, pvar=0xbfffe750, bounce=0x0) at m_mode.c:1975 #3 0xb7e4d909 in _do_mode (chptr=0x817dea0, cptr=0x819dc58, sptr=0x819dc58, parc=0x20000000, parv=0x8157560, sendts=0x0, samode=0x0) at m_mode.c:405 #4 0xb7e4ccd2 in m_mode (cptr=0x819dc58, sptr=0x819dc58, parc=0x3, parv=0x811e540) at m_mode.c:346 #5 0x0806729b in parse (cptr=0x819dc58, buffer=0x819dd3c "MODE", bufend=0x819dd48 "") at parse.c:440 #6 0x080665b2 in dopacket (cptr=0x819dc58, buffer=0x80b0500 "MODE #erk -d\n", length=0x0) at packet.c:138 #7 0x0805620b in read_packet (cptr=0x819dc58, rfd=0x819df50) at s_bsd.c:1502 0000008 0x08056a0e in read_message (delay=0x1, listp=0x8131a20) at s_bsd.c:1960 #9 0x08062374 in main (argc=0x0, argv=0x0) at ircd.c:1540 | ||||
| 3rd party modules | |||||
|
|
channelmode modules currently have to be permanent :). but yes, it's something that has to be fixed in 3.3* |
|
|
Wanna make this a child of the 3.3 ticket then? ;) |
|
|
for now we just don't permit unloading channel mode modules, due to all their trouble. (you can re-load them in 3.4-alpha3 and up, though, for on-the-fly upgrades of code) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-11-22 12:53 | Nazzy | New Issue | |
| 2005-11-23 19:04 | syzop | Note Added: 0010798 | |
| 2005-12-09 16:31 | syzop | Severity | crash => minor |
| 2007-04-16 01:28 | WolfSage | Note Added: 0013441 | |
| 2007-04-16 10:38 |
|
Status | new => acknowledged |
| 2015-05-27 18:23 | syzop | Note Added: 0018359 | |
| 2015-05-27 18:23 | syzop | Status | acknowledged => closed |
| 2015-05-27 18:23 | syzop | Assigned To | => syzop |
| 2015-05-27 18:23 | syzop | Resolution | open => wont fix |