Parfait analysis errors
Parfait reports some errors (e.g. memory leaks, unclosed file descriptor) in Lighttpd version 1.4.33, an attached patch file will fix them.
Updated by kukackajiri over 6 years ago
- File src_array.c.patch src_array.c.patch added
- File src_configfile.c.patch src_configfile.c.patch added
- File src_fdevent.c.patch src_fdevent.c.patch added
- File src_lemon.c.patch src_lemon.c.patch added
- File src_lempar.c.patch src_lempar.c.patch added
- File src_mod_mysql_vhost.c.patch src_mod_mysql_vhost.c.patch added
- File src_mod_webdav.c.patch src_mod_webdav.c.patch added
Update - I split patch file into smaller patches for easier comments. They are named by file they patch, as there is no dependency between them.
Updated by stbuehler over 6 years ago
- mod_webdav fd leak: this is a real one, although if opening the upload tmpfiles fails we are screwed anyway.
- mod_mysql_vhost: leak on config init, looks like one buffer per block. also leaks in "non error" cases.
- lemon.c: don't care, it's just the parser generator
- fdevent.c: misses the error cases. already fixed in svn (found with clang analyzer)
- array.c/array_replace: du is not allowed to be NULL (maybe add assert())
- configfile.c array_insert_unique() call: if array_insert_unique fails here there are deeper problems.. the keys are supposed to be unique in that stage. (maybe add assert())
- configfile.c modules/prepends NULL checks: i'd rather have a segfault if this happens (maybe add assert())
- parfait annotations: as i already said, i'm not applying those
The problem with assert() is that it could be optimized away, so we can't do anything "real" in the standard assert() (only boolean checks without side effects).
Also available in: Atom