Bug #2530


Parfait analysis errors

Added by kukackajiri over 10 years ago. Updated over 10 years ago.

Target version:


Parfait reports some errors (e.g. memory leaks, unclosed file descriptor) in Lighttpd version 1.4.33, an attached patch file will fix them.


07-parfait-errors.patch (5.66 KB) 07-parfait-errors.patch kukackajiri, 2013-11-18 15:01
src_array.c.patch (347 Bytes) src_array.c.patch kukackajiri, 2013-11-18 15:13
src_fdevent.c.patch (302 Bytes) src_fdevent.c.patch kukackajiri, 2013-11-18 15:13
src_configfile.c.patch (2.61 KB) src_configfile.c.patch kukackajiri, 2013-11-18 15:13
src_lemon.c.patch (532 Bytes) src_lemon.c.patch kukackajiri, 2013-11-18 15:13
src_lempar.c.patch (472 Bytes) src_lempar.c.patch kukackajiri, 2013-11-18 15:13
src_mod_mysql_vhost.c.patch (853 Bytes) src_mod_mysql_vhost.c.patch kukackajiri, 2013-11-18 15:13
src_mod_webdav.c.patch (608 Bytes) src_mod_webdav.c.patch kukackajiri, 2013-11-18 15:13
09.parfait-community-requests.patch (1.67 KB) 09.parfait-community-requests.patch kukackajiri, 2013-12-09 17:55
09.parfait-community-requests.patch (1.26 KB) 09.parfait-community-requests.patch correct one kukackajiri, 2013-12-09 17:58

Updated by kukackajiri over 10 years ago

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.

Actions #2

Updated by stbuehler over 10 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, ...

Actions #3

Updated by stbuehler over 10 years ago

I'll probably apply:
  • 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.
These won't get applied:
  • 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).

Actions #4

Updated by stbuehler over 10 years ago

  • Target version set to 1.4.34
Actions #5

Updated by kukackajiri over 10 years ago

I changed those patches: array.c, configfile.c to use assert as you asked, here it is.

Actions #6

Updated by kukackajiri over 10 years ago

I'm sorry, wrong file - I accidentally uploaded my patch for patched version, here is correct one.

Actions #7

Updated by stbuehler over 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2930.


Also available in: Atom