Bug #2530
closedParfait analysis errors
Description
Parfait reports some errors (e.g. memory leaks, unclosed file descriptor) in Lighttpd version 1.4.33, an attached patch file will fix them.
Files
Updated by kukackajiri almost 11 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 almost 11 years ago
Splitting a patch into patch per file doesn't make review easier. If you wanted to split by something you could have grouped by severity, parfait annotations (which i won't apply), false positives, ...
Updated by stbuehler almost 11 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).
Updated by kukackajiri almost 11 years ago
- File 09.parfait-community-requests.patch 09.parfait-community-requests.patch added
- Assignee set to stbuehler
I changed those patches: array.c, configfile.c to use assert as you asked, here it is.
Updated by kukackajiri almost 11 years ago
I'm sorry, wrong file - I accidentally uploaded my patch for patched version, here is correct one.
Updated by stbuehler almost 11 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset r2930.
Also available in: Atom