View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002800 | unreal | module api | public | 2006-02-06 00:03 | 2007-06-11 16:16 |
| Reporter | Xuefer | Assigned To | |||
| Priority | normal | Severity | crash | Reproducibility | always |
| Status | closed | Resolution | suspended | ||
| Product Version | 3.2.4 | ||||
| Summary | 0002800: IsupportDel double free for custom module | ||||
| Description | although IsupportDel isn't documented yet on http://modules.unrealircd.com/, but i'm assusming it's similar as http://modules.unrealircd.com/commanddel.html [assume] The *Del function destroys a command that was created with the *Add function. It is __recommended__, but not required that you call this function in your Mod_Unload. Any commands that are not unloaded when the module is destroyed will be automatically deleted by Unreal. [/assume] so i put a IsupportDel() in my Mod_Unload, here goes.. *** the real problem: IsupportDel() does not delete isupportobj from module->objects. if i call IsupportDel in Mod_Unload, modules.c still IsupportDel again on it, which issue a double free and lead to wired result on /rehash (crash elsewhere in my case) it took lots of time to catch it by chance | ||||
| Attached Files | isupport.patch (812 bytes) | ||||
| 3rd party modules | |||||
|
|
I suppose this patch (uploaded) should fix it. I'll have to test to be sure.. of course.. Kinda sounded like you might have patched it on your end yourself as well? Was it the same approach/patch? |
|
|
not yet, i workaround it by not calling IsupportDel on unload. the patch looks good. |
|
|
ah of course ;p. patch is incorrect btw, causes crashes, but I'll take a look at the issue again later.. |
|
|
This is an error in the documentation (which is hugely outdated) - modules should never call CommandDel on their own due to the fact they're "garbage collected" on unload. Admittedly, this is more 3.2 module craq i hope to fix with Velcro .. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2006-02-06 00:03 | Xuefer | New Issue | |
| 2006-04-11 18:11 | syzop | File Added: isupport.patch | |
| 2006-04-11 18:12 | syzop | Note Added: 0011535 | |
| 2006-04-11 18:13 | syzop | Note Edited: 0011535 | |
| 2006-04-11 20:41 | Xuefer | Note Added: 0011536 | |
| 2006-04-15 15:23 | syzop | Note Added: 0011559 | |
| 2006-08-13 13:58 | syzop | Category | ircd => module |
| 2007-04-19 04:28 |
|
Status | new => acknowledged |
| 2007-04-19 18:56 |
|
Status | acknowledged => confirmed |
| 2007-06-11 16:15 |
|
Status | confirmed => closed |
| 2007-06-11 16:15 |
|
Note Added: 0014327 | |
| 2007-06-11 16:16 |
|
Resolution | open => suspended |
| 2017-01-06 15:48 | syzop | Category | module => module api |