View Issue Details

IDProjectCategoryView StatusLast Update
0002800unrealmodule apipublic2007-06-11 16:16
ReporterXuefer Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionsuspended 
Product Version3.2.4 
Summary0002800: IsupportDel double free for custom module
Descriptionalthough 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

Activities

syzop

2006-04-11 18:12

administrator   ~0011535

Last edited: 2006-04-11 18:13

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?

Xuefer

2006-04-11 20:41

reporter   ~0011536

not yet, i workaround it by not calling IsupportDel on unload. the patch looks good.

syzop

2006-04-15 15:23

administrator   ~0011559

ah of course ;p.

patch is incorrect btw, causes crashes, but I'll take a look at the issue again later..

stskeeps

2007-06-11 16:15

reporter   ~0014327

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 ..

Issue History

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 stskeeps Status new => acknowledged
2007-04-19 18:56 stskeeps Status acknowledged => confirmed
2007-06-11 16:15 stskeeps Status confirmed => closed
2007-06-11 16:15 stskeeps Note Added: 0014327
2007-06-11 16:16 stskeeps Resolution open => suspended
2017-01-06 15:48 syzop Category module => module api