From Apache OpenOffice Wiki
Revision as of 11:33, 22 March 2010 by B michaelsen (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

What is it?

There may occur tasks in IssueZilla whose summary begins with "Valgrind ".

These tasks are generated by memory violation messages of Valgrind, or to be more specific: Valgrind's "memcheck" tool.

Valgrind does only runtime tests, so the number of results depends on executing the Office in as many different ways as possible. To do that, the tests of the automated GUI testing are run under Valgrind.

These tasks are memory violation errors and as such potential GPFs.

Target and Priority

The severity is inbetween P2 and P3. Normally these tasks should be fixed to the next available release.


The tasks are generated automaticly, the owners are deduced from the file name where the issue occurred (in rare cases there may only be known a library name). As owner association is done automatically, owners might be inaccurate sometimes. Then, please forward the task to the appropriate owner.

How to Read the Task Text

The task text starts with

Error Type:   like "Invalid read"
Error Text:   like "Invalid read of size 16"

then follows the call stack of the function that violated the memory. The topmost frame being the place where the error happened. This doesn't necessarily have to be the place of the real cause, since an unitialized variable may get passed as a parameter through a chain of function calls and then is reported where it is first used, so you may have to hunt down the stack to find the real culprit where the variable is defined but not initialized.

Sometimes there follows a line


that gives the address where memory was violated, this may be followed by the call stack where this memory was allocated (if it was allocated at all).

At the bottom is a list of the automatic GUI tests where this error occured (find those tests in the list at

To debug this, compile the library of the first stack frame with debug. Then you can either

  • run the Office under the test tool and let run one of the mentioned tests, set a breakpoint into the first stack frame and try to find the memory violation,
  • run the Office under Valgrind and try do anything to enter the given stack frame.

Until now (Oct 24 2006) submitted tasks are created with Valgrind version 3.2.0 .


These bugs can normally not be seen by QA, so they should be verified by developer review. If the task's fix is integrated into a milestone and after that would occur again in a Valgrind run, this would be noticed and then the task be reopened again.

Unfixable Tasks

Sometimes tasks occur in third party code, or there may be (quite rarely) false positives or the problem cannot be fixed for another reason. This is the suggested handling for those:

External Tasks

If the defect occurs in third party code, the task can be set to RESOLVED/INVALID (as these are no bugs). Future Valgrind runs will be modified, so these issues will not be filed again.


  1. Contact Nikolai (np AT openoffice DOT org) and describe, why this is "unfixable". Possibly there can be found a solution.
  2. If the task still is not fixable, set status to RESOLVED/WONTFIX but leave it open and hand it over to Nikolai (IssueZilla-Id: np).
    • If it is suspect to be a false positive, that will be checked, as soon as a run with a newer Valgrind version is done.
    • If it is just not fixable, the internal Valgrind database will label this task, so this task is not submitted again. The task will be closed. This case, however, should occur as rare as possible, because Valgrind tasks show memory corruption which, of course, is undesirable to keep in the Office.

Links and Contact


Using Valgrind with OOo: Valgrind

Automatic GUI Tests: TestToolWithValgrind

Contact (regarding Valgrind tasks): np AT_NOSPAM openoffice DOT_NOSPAM org

Personal tools