Project

General

Profile

Bug #2530

Parfait analysis errors

Added by kukackajiri almost 3 years ago. Updated over 2 years ago.

Status:
Fixed
Priority:
Low
Assignee:
Category:
-
Target version:
Start date:
2013-11-18
Due date:
% Done:

100%

Missing in 1.5.x:
No

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.

07-parfait-errors.patch View (5.66 KB) kukackajiri, 2013-11-18 15:01

src_array.c.patch View (347 Bytes) kukackajiri, 2013-11-18 15:13

src_fdevent.c.patch View (302 Bytes) kukackajiri, 2013-11-18 15:13

src_configfile.c.patch View (2.61 KB) kukackajiri, 2013-11-18 15:13

src_lemon.c.patch View (532 Bytes) kukackajiri, 2013-11-18 15:13

src_lempar.c.patch View (472 Bytes) kukackajiri, 2013-11-18 15:13

src_mod_mysql_vhost.c.patch View (853 Bytes) kukackajiri, 2013-11-18 15:13

src_mod_webdav.c.patch View (608 Bytes) kukackajiri, 2013-11-18 15:13

09.parfait-community-requests.patch View (1.67 KB) kukackajiri, 2013-12-09 17:55

09.parfait-community-requests.patch View - correct one (1.26 KB) kukackajiri, 2013-12-09 17:58

Associated revisions

Revision 65756682 (diff)
Added by stbuehler over 2 years ago

[mod_mysql_vhost] fix memory leak on config init (#2530)

From: Stefan Bühler <>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2929 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 24994e11 (diff)
Added by stbuehler over 2 years ago

[mod_webdav] fix fd leak found with parfait (fixes #2530, thx kukackajiri)

From: Stefan Bühler <>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2930 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 524e0a30 (diff)
Added by stbuehler over 2 years ago

add two asserts to help parfait (#2530)

From: Stefan Bühler <>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2931 152afb58-edef-0310-8abb-c4023f1b3aa9

Revision 2929 (diff)
Added by stbuehler over 2 years ago

[mod_mysql_vhost] fix memory leak on config init (#2530)

From: Stefan Bühler <>

Revision 2930 (diff)
Added by stbuehler over 2 years ago

[mod_webdav] fix fd leak found with parfait (fixes #2530, thx kukackajiri)

From: Stefan Bühler <>

Revision 2931 (diff)
Added by stbuehler over 2 years ago

add two asserts to help parfait (#2530)

From: Stefan Bühler <>

History

#1 Updated by kukackajiri almost 3 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.

#2 Updated by stbuehler almost 3 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, ...

#3 Updated by stbuehler almost 3 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).

#4 Updated by stbuehler almost 3 years ago

  • Target version set to 1.4.34

#5 Updated by kukackajiri almost 3 years ago

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

#6 Updated by kukackajiri almost 3 years ago

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

#7 Updated by stbuehler over 2 years ago

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

Applied in changeset r2930.

Also available in: Atom